From a058657b467860da696122eb5cc44da83ce434a0 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 12 Jun 2022 16:29:59 +0800 Subject: [PATCH] Update index.py --- plugins/mysql/index.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index 579d15436..399ebebb5 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -333,7 +333,8 @@ def initMysql8Pwd(): # r = dbcurr.execute(alter_root_pwd) tmp_file = "/tmp/mysql_init_tmp.log" mw.writeFile(tmp_file, alter_root_pwd) - cmd_pass = serverdir + '/bin/mysql -uroot -p"' + password + '" < ' + tmp_file + cmd_pass = serverdir + '/bin/mysql --connect-expired-password -uroot -p"' + \ + password + '" < ' + tmp_file print(cmd_pass) print(mw.execShell(cmd_pass)) pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,))