From dbe2a1f0df1a51684aefa423b68c0a6b8d945f37 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Fri, 22 Dec 2023 04:56:05 +0800 Subject: [PATCH] Update index.py --- plugins/mysql/index.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index 2bc7967e6..15fe1f449 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -1051,7 +1051,7 @@ def importDbExternal(): myPass(True, pwd) mysql_cmd = getServerDir() + '/bin/mysql --defaults-file=' + my_cnf + \ - ' -uroot -p\"' + pwd + '\" -f ' + name + ' < ' + import_sql + ' -uroot -p"' + pwd + '" -f ' + name + ' < ' + import_sql # print(mysql_cmd) rdata = mw.execShell(mysql_cmd) @@ -1089,8 +1089,8 @@ def importDbBackup(): pwd = pSqliteDb('config').where('id=?', (1,)).getField('mysql_root') sock = getSocketFile() - mysql_cmd = getServerDir() + '/bin/mysql -S ' + sock + ' -uroot -p' + pwd + \ - ' ' + name + ' < ' + file_path_sql + mysql_cmd = getServerDir() + '/bin/mysql -S ' + sock + ' -uroot -p"' + pwd + \ + '" ' + name + ' < ' + file_path_sql # print(mysql_cmd) # os.system(mysql_cmd)