From 41a36a6fd316053fb9b35e3db4df10ea531fc3bb Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Fri, 22 Dec 2023 00:52:15 +0800 Subject: [PATCH] Update index.py --- plugins/mariadb/index.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/mariadb/index.py b/plugins/mariadb/index.py index 2e0c4aaed..63e186f1f 100755 --- a/plugins/mariadb/index.py +++ b/plugins/mariadb/index.py @@ -967,7 +967,7 @@ def syncGetDatabases(): host = user["Host"] break - ps = mw.getMsg('INPUT_PS') + ps = vdb_name if vdb_name == 'test': ps = mw.getMsg('DATABASE_TEST') addTime = time.strftime('%Y-%m-%d %X', time.localtime()) @@ -1280,6 +1280,7 @@ def resetDbRootPwd(version): serverdir = getServerDir() myconf = serverdir + "/etc/my.cnf" pwd = mw.getRandomString(16) + pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,)) db_option = "-S " + serverdir + "/mysql.sock" cmd_pass = serverdir + '/bin/mysql ' + db_option + ' -uroot -e'