pull/577/head
Mr Chen 1 year ago
parent 00008b657c
commit d5864db956
  1. 4
      plugins/mysql/index.py
  2. 1
      plugins/mysql/install.sh

@ -2777,6 +2777,7 @@ def initSlaveStatus(version=''):
return mw.returnJson(False, 'MySQL未启动', []) return mw.returnJson(False, 'MySQL未启动', [])
mode_file = getSyncModeFile() mode_file = getSyncModeFile()
# print(mode_file)
if not os.path.exists(mode_file): if not os.path.exists(mode_file):
return mw.returnJson(False, '需要先设置同步配置') return mw.returnJson(False, '需要先设置同步配置')
@ -2864,8 +2865,9 @@ def initSlaveStatusSyncUser(version=''):
pinfo = parseSlaveSyncCmd(cmd_sql) pinfo = parseSlaveSyncCmd(cmd_sql)
except Exception as e: except Exception as e:
return mw.returnJson(False, base_t + '->CMD同步命令不合规范!') return mw.returnJson(False, base_t + '->CMD同步命令不合规范!')
# print(u['cmd']) # print(cmd_sql)
t = pdb.query(cmd_sql) t = pdb.query(cmd_sql)
# print(t)
isError = isSqlError(t) isError = isSqlError(t)
if isError: if isError:
return isError return isError

@ -9,6 +9,7 @@ export PATH
# cd /www/server/mdserver-web && source bin/activate && python3 plugins/mysql/index.py try_slave_sync_bugfix {} # cd /www/server/mdserver-web && source bin/activate && python3 plugins/mysql/index.py try_slave_sync_bugfix {}
# cd /www/server/mdserver-web && python3 plugins/mysql/index.py do_full_sync {"db":"xxx","sign":"","begin":1} # cd /www/server/mdserver-web && python3 plugins/mysql/index.py do_full_sync {"db":"xxx","sign":"","begin":1}
# cd /www/server/mdserver-web && python3 plugins/mysql/index.py sync_database_repair {"db":"xxx","sign":""} # cd /www/server/mdserver-web && python3 plugins/mysql/index.py sync_database_repair {"db":"xxx","sign":""}
# cd /www/server/mdserver-web && python3 plugins/mysql/index.py init_slave_status
curPath=`pwd` curPath=`pwd`
rootPath=$(dirname "$curPath") rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath") rootPath=$(dirname "$rootPath")

Loading…
Cancel
Save