From 9a77b6e99e8ba88a62271d51c854580ba00ddd49 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 13 Jun 2022 10:01:22 +0800 Subject: [PATCH] Update index.py --- plugins/mysql/index.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index ed33de116..ab3552f15 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -358,7 +358,11 @@ def initMysql8Pwd(): # dbcurr.execute('SET NAMES UTF8MB4') # # with mysql_native_password - alter_root_pwd = "flush privileges;alter user 'root'@'localhost' IDENTIFIED WITH mysql_native_password by '" + pwd + "';" + alter_root_pwd = 'flush privileges;' + alter_root_pwd = alter_root_pwd + \ + "alter user 'root'@'localhost' IDENTIFIED by '" + 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;" # dbcurr.execute(alter_root_pwd)