From 0b502a69a93bbf6f9effac0aad62c679b0c5c61b Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 6 Jul 2022 13:23:31 +0800 Subject: [PATCH] Update index.py --- plugins/mysql-ya/index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/mysql-ya/index.py b/plugins/mysql-ya/index.py index 0b153eb8d..10df3cba6 100755 --- a/plugins/mysql-ya/index.py +++ b/plugins/mysql-ya/index.py @@ -323,13 +323,13 @@ def initMysql8Pwd(): "alter user 'root'@'localhost' IDENTIFIED WITH mysql_native_password by '" + pwd + "';" alter_root_pwd = alter_root_pwd + "flush privileges;" - cmd_pass = serverdir + '/bin/mysqladmin -uroot password root' + cmd_pass = 'mysqladmin -uroot password root' data = mw.execShell(cmd_pass) # print(data) tmp_file = "/tmp/mysql_init_tmp.log" mw.writeFile(tmp_file, alter_root_pwd) - cmd_pass = serverdir + '/bin/mysql -uroot -proot < ' + tmp_file + cmd_pass = 'mysql -uroot -proot < ' + tmp_file data = mw.execShell(cmd_pass) # print(data)