From 64ccba7595ce3636037570ab84b80e071ba7314f Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Fri, 22 Dec 2023 21:37:57 +0800 Subject: [PATCH] Update index.py --- plugins/mysql/index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index ac375630a..705784431 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -514,11 +514,11 @@ def initMysqlPwd(): hostname = mw.execShell('hostname')[0].strip() if hostname != 'localhost': drop_hostname = serverdir + '/bin/mysql --defaults-file=' + \ - myconf + ' -uroot -p' + pwd + ' -e "drop user \'\'@\'' + hostname + '\'";' + myconf + ' -uroot -p"' + pwd + '" -e "drop user \'\'@\'' + hostname + '\'";' mw.execShell(drop_hostname) drop_root_hostname = serverdir + '/bin/mysql --defaults-file=' + \ - myconf + ' -uroot -p' + pwd + ' -e "drop user \'root\'@\'' + hostname + '\'";' + myconf + ' -uroot -p"' + pwd + '" -e "drop user \'root\'@\'' + hostname + '\'";' mw.execShell(drop_root_hostname) pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,))