From 971eb133f060cd31d9d1cf3bfdc0e4de80ca8907 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 12 Jul 2022 11:01:14 +0800 Subject: [PATCH] Update index.py --- plugins/mysql/index.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index 143771810..ca4e80563 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -386,6 +386,9 @@ def initMysql8Pwd(): pwd = mw.getRandomString(16) alter_root_pwd = 'flush privileges;' + + alter_root_pwd = alter_root_pwd + \ + "UPDATE mysql.user SET authentication_string='' WHERE user='root';" alter_root_pwd = alter_root_pwd + \ "alter user 'root'@'localhost' IDENTIFIED by '" + pwd + "';" alter_root_pwd = alter_root_pwd + \