From 6f20b46acddee8fd6df7f948bb56aeb15607c392 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 12 Jun 2022 16:33:03 +0800 Subject: [PATCH] Update index.py --- plugins/mysql/index.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index 399ebebb5..9ea1bf061 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -327,8 +327,9 @@ def initMysql8Pwd(): # with mysql_native_password alter_root_pwd = "flush privileges;" - alter_root_pwd = alter_root_pwd + \ - "alter user 'root'@'localhost' IDENTIFIED WITH mysql_native_password by '" + pwd + "';" + alter_root_pwd = alter_root_pwd + "set password='" + pwd + "';" + # alter_root_pwd = alter_root_pwd + \ + # "alter user 'root'@'localhost' IDENTIFIED WITH mysql_native_password by '" + pwd + "';" alter_root_pwd = alter_root_pwd + "flush privileges;" # r = dbcurr.execute(alter_root_pwd) tmp_file = "/tmp/mysql_init_tmp.log"