diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index 4449bd9b2..efd7ad9d0 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -2964,7 +2964,13 @@ def doFullSyncUser(version=''): print(dump_sql_data) mw.execShell(dump_sql_data) - writeDbSyncStatus({'code': 2, 'msg': '本地导入数据...', 'progress': 40}) + writeDbSyncStatus({'code': 2, 'msg': '正在停止从库...', 'progress': 30}) + if version == '8.0': + db.query("stop slave user='{}' password='{}';".format(user, apass)) + else: + db.query("stop slave") + + writeDbSyncStatus({'code': 3, 'msg': '正在到本地导入数据中...', 'progress': 40}) if os.path.exists(bak_file): pwd = pSqliteDb('config').where('id=?', (1,)).getField('mysql_root') sock = getSocketFile()