From 82ca2bef99186d0d4d7ab3af28ae8c55d06b58e0 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 17 Sep 2018 14:27:50 +0000 Subject: [PATCH] fixed query of previous commit --- apps/db_assembler/includes/functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/db_assembler/includes/functions.sh b/apps/db_assembler/includes/functions.sh index e79802d82..b6be46f77 100644 --- a/apps/db_assembler/includes/functions.sh +++ b/apps/db_assembler/includes/functions.sh @@ -35,8 +35,8 @@ function dbasm_mysqlExec() { # it happens on new mysql 5.7 installations # since mysql_native_password is explicit now if [[ "$err" == *"Access denied"* ]]; then - echo "Setting mysql_native_password for $PROMPT_USER ..." - sudo "$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$PROMPT_USER" $options -e "ALTER USER '${PROMPT_USER}'@'localhost' IDENTIFIED WITH mysql_native_password BY '${PROMPT_PASS}';" + echo "Setting mysql_native_password and for $PROMPT_USER ..." + sudo -h "$MYSQL_HOST" "$DB_MYSQL_EXEC" -e "UPDATE mysql.user SET authentication_string=PASSWORD('${PROMPT_PASS}'), plugin='mysql_native_password' WHERE User='${PROMPT_USER}'; FLUSH PRIVILEGES;" fi fi