From f0af84f940d75ba1e8615ac0444f4cfa9fb39977 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Fri, 22 Dec 2023 21:54:05 +0800 Subject: [PATCH] Update index.py --- plugins/mysql-apt/index.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/mysql-apt/index.py b/plugins/mysql-apt/index.py index 095ca022d..b55e0ad90 100755 --- a/plugins/mysql-apt/index.py +++ b/plugins/mysql-apt/index.py @@ -114,7 +114,16 @@ def getErrorLogsFile(): tmp = re.search(rep, content) return tmp.groups()[0].strip() - +def getAuthPolicy(): + file = getConf() + content = mw.readFile(file) + rep = 'authentication_policy\s*=\s*(.*)' + tmp = re.search(rep, content) + if tmp: + return tmp.groups()[0].strip() + # caching_sha2_password + return 'mysql_native_password' + def contentReplace(content): service_path = mw.getServerDir() content = content.replace('{$ROOT_PATH}', mw.getRootDir())