pull/109/head
midoks 4 years ago
parent fb95ea864d
commit 0c8e03f152
  1. 3
      plugins/mysql/conf/my.cnf
  2. 2
      plugins/mysql/conf/my8.0.cnf
  3. 4
      plugins/mysql/index.py

@ -42,6 +42,9 @@ slow-query-log-file={$SERVER_APP_PATH}/data/mysql-slow.log
long_query_time=3
#log_queries_not_using_indexes=on
relay-log=mdserver
relay-log-index=mdserver
#master config
#binlog-do-db = demo
#binlog-ignore-db = test

@ -42,6 +42,8 @@ slow-query-log-file={$SERVER_APP_PATH}/data/mysql-slow.log
long_query_time=3
#log_queries_not_using_indexes=on
relay-log=mdserver
relay-log-index=mdserver
#master config
#binlog-do-db = demo

@ -1255,7 +1255,7 @@ def getMasterStatus(version=''):
db = pMysqlDb()
dlist = db.query('show slave status')
if len(dlist) > 0 and dlist[0][10] == 'Yes' and dlist[0][11] == 'Yes':
if len(dlist) > 0 and (dlist[0][10] == 'Yes' or dlist[0][11] == 'Yes'):
data['slave_status'] = True
return mw.returnJson(master_status, '设置成功', data)
@ -1465,7 +1465,7 @@ def setSlaveStatus(version=''):
db = pMysqlDb()
dlist = db.query('show slave status')
if len(dlist) > 0 and dlist[0][10] == 'Yes' and dlist[0][11] == 'Yes':
if len(dlist) > 0 and (dlist[0][10] == 'Yes' or dlist[0][11] == 'Yes'):
db.query('stop slave')
else:
db.query('start slave')

Loading…
Cancel
Save