From d054f7f9cd3029b690f1cdceaadfba4676939c7a Mon Sep 17 00:00:00 2001 From: dami Date: Wed, 2 Apr 2025 15:39:59 +0800 Subject: [PATCH] Update index.py --- plugins/mysql/index.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index 2070075a7..d7489a99b 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -2404,7 +2404,12 @@ def getMasterRepSlaveUserCmd(version): port = getMyPort() db = pMysqlDb() - mstatus = db.query('show master status') + # SHOW REPLICA STATUS; + + cmd_status = "show master status" + if pk_version.parse(ver) > pk_version.parse("8.0"): + cmd_status = "show replica status" + mstatus = db.query(cmd_status) if len(mstatus) == 0: return mw.returnJson(False, '未开启!')