Mysql 8 support

This comes by hand with #1805
This commit is contained in:
Maksim Usmanov | Maks 2019-01-13 00:23:26 +01:00 committed by GitHub
commit 1742357022
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -543,7 +543,7 @@ rebuild_mysql_database() {
mysql_query "CREATE DATABASE \`$DB\` CHARACTER SET $CHARSET" >/dev/null mysql_query "CREATE DATABASE \`$DB\` CHARACTER SET $CHARSET" >/dev/null
if [ "$mysql_fork" = "mysql" ]; then if [ "$mysql_fork" = "mysql" ]; then
# mysql # mysql
if [ "$(echo $mysql_ver |cut -d '.' -f2)" -ge 7 ]; then if [ "$(echo $mysql_ver |cut -d '.' -f2)" -ge 7 ] || [ "$(echo $mysql_ver |cut -d '.' -f1)" -eq 8 ]; then
# mysql >= 5.7 # mysql >= 5.7
mysql_query "CREATE USER IF NOT EXISTS \`$DBUSER\`" > /dev/null mysql_query "CREATE USER IF NOT EXISTS \`$DBUSER\`" > /dev/null
mysql_query "CREATE USER IF NOT EXISTS \`$DBUSER\`@localhost" > /dev/null mysql_query "CREATE USER IF NOT EXISTS \`$DBUSER\`@localhost" > /dev/null