diff --git a/src/freedombone-utils-database b/src/freedombone-utils-database index 4219a678..a5045c75 100755 --- a/src/freedombone-utils-database +++ b/src/freedombone-utils-database @@ -178,6 +178,7 @@ function install_mariadb { systemctl restart mariadb run_query mysql "CREATE USER 'root@localhost' IDENTIFIED BY '${MARIADB_PASSWORD}'; flush privileges;" + run_query mysql "update mysql.user set plugin = '' where User='root@localhost'; flush privileges;" run_query mysql "GRANT ALL PRIVILEGES ON * TO 'root@localhost'; flush privileges;" mysqladmin -u root password "$MARIADB_PASSWORD" @@ -270,7 +271,9 @@ function create_database { fi echo "create database ${app_name}; CREATE USER '$app_admin_username@localhost' IDENTIFIED BY '${app_admin_password}'; +update mysql.user set plugin = '' where User='$app_admin_username@localhost'; GRANT ALL PRIVILEGES ON ${app_name}.* TO '$app_admin_username@localhost'; +flush privileges; quit" > $INSTALL_DIR/batch.sql chmod 600 $INSTALL_DIR/batch.sql mysql -u root --password="$MARIADB_PASSWORD" < $INSTALL_DIR/batch.sql