pull/600/head
Mr Chen 11 months ago
parent f1eac4f309
commit 525bcc909f
  1. 8
      plugins/mysql-apt/index.py
  2. 8
      plugins/mysql-yum/index.py
  3. 8
      plugins/mysql/index.py

@ -280,7 +280,7 @@ def getPidFile():
return tmp.groups()[0].strip() return tmp.groups()[0].strip()
def binLog(): def binLog(version=''):
args = getArgs() args = getArgs()
conf = getConf() conf = getConf()
con = mw.readFile(conf) con = mw.readFile(conf)
@ -291,7 +291,7 @@ def binLog():
con = con.replace('#log-bin=mysql-bin', 'log-bin=mysql-bin') con = con.replace('#log-bin=mysql-bin', 'log-bin=mysql-bin')
con = con.replace('#binlog_format=mixed', 'binlog_format=mixed') con = con.replace('#binlog_format=mixed', 'binlog_format=mixed')
mw.execShell('sync') mw.execShell('sync')
restart() restart(version)
else: else:
path = getDataDir() path = getDataDir()
if 'status' in args: if 'status' in args:
@ -305,7 +305,7 @@ def binLog():
con = con.replace('log-bin=mysql-bin', '#log-bin=mysql-bin') con = con.replace('log-bin=mysql-bin', '#log-bin=mysql-bin')
con = con.replace('binlog_format=mixed', '#binlog_format=mixed') con = con.replace('binlog_format=mixed', '#binlog_format=mixed')
mw.execShell('sync') mw.execShell('sync')
restart() restart(version)
mw.execShell('rm -f ' + path + '/mysql-bin.*') mw.execShell('rm -f ' + path + '/mysql-bin.*')
mw.writeFile(conf, con) mw.writeFile(conf, con)
@ -3549,7 +3549,7 @@ if __name__ == "__main__":
elif func == 'conf': elif func == 'conf':
print(getConf()) print(getConf())
elif func == 'bin_log': elif func == 'bin_log':
print(binLog()) print(binLog(version))
elif func == 'binlog_list': elif func == 'binlog_list':
print(binLogList()) print(binLogList())
elif func == 'clean_bin_log': elif func == 'clean_bin_log':

@ -270,7 +270,7 @@ def status(version=''):
return 'start' return 'start'
def binLog(): def binLog(version=''):
args = getArgs() args = getArgs()
conf = getConf() conf = getConf()
con = mw.readFile(conf) con = mw.readFile(conf)
@ -281,7 +281,7 @@ def binLog():
con = con.replace('#log-bin=mysql-bin', 'log-bin=mysql-bin') con = con.replace('#log-bin=mysql-bin', 'log-bin=mysql-bin')
con = con.replace('#binlog_format=mixed', 'binlog_format=mixed') con = con.replace('#binlog_format=mixed', 'binlog_format=mixed')
mw.execShell('sync') mw.execShell('sync')
restart() restart(version)
else: else:
path = getDataDir() path = getDataDir()
if 'status' in args: if 'status' in args:
@ -295,7 +295,7 @@ def binLog():
con = con.replace('log-bin=mysql-bin', '#log-bin=mysql-bin') con = con.replace('log-bin=mysql-bin', '#log-bin=mysql-bin')
con = con.replace('binlog_format=mixed', '#binlog_format=mixed') con = con.replace('binlog_format=mixed', '#binlog_format=mixed')
mw.execShell('sync') mw.execShell('sync')
restart() restart(version)
mw.execShell('rm -f ' + path + '/mysql-bin.*') mw.execShell('rm -f ' + path + '/mysql-bin.*')
mw.writeFile(conf, con) mw.writeFile(conf, con)
@ -3528,7 +3528,7 @@ if __name__ == "__main__":
elif func == 'conf': elif func == 'conf':
print(getConf()) print(getConf())
elif func == 'bin_log': elif func == 'bin_log':
print(binLog()) print(binLog(version))
elif func == 'binlog_list': elif func == 'binlog_list':
print(binLogList()) print(binLogList())
elif func == 'clean_bin_log': elif func == 'clean_bin_log':

@ -323,7 +323,7 @@ def getPidFile():
return tmp.groups()[0].strip() return tmp.groups()[0].strip()
def binLog(): def binLog(version = ''):
args = getArgs() args = getArgs()
conf = getConf() conf = getConf()
con = mw.readFile(conf) con = mw.readFile(conf)
@ -334,7 +334,7 @@ def binLog():
con = con.replace('#log-bin=mysql-bin', 'log-bin=mysql-bin') con = con.replace('#log-bin=mysql-bin', 'log-bin=mysql-bin')
con = con.replace('#binlog_format=mixed', 'binlog_format=mixed') con = con.replace('#binlog_format=mixed', 'binlog_format=mixed')
mw.execShell('sync') mw.execShell('sync')
restart() restart(version)
else: else:
path = getDataDir() path = getDataDir()
if 'status' in args: if 'status' in args:
@ -348,7 +348,7 @@ def binLog():
con = con.replace('log-bin=mysql-bin', '#log-bin=mysql-bin') con = con.replace('log-bin=mysql-bin', '#log-bin=mysql-bin')
con = con.replace('binlog_format=mixed', '#binlog_format=mixed') con = con.replace('binlog_format=mixed', '#binlog_format=mixed')
mw.execShell('sync') mw.execShell('sync')
restart() restart(version)
mw.execShell('rm -f ' + path + '/mysql-bin.*') mw.execShell('rm -f ' + path + '/mysql-bin.*')
mw.writeFile(conf, con) mw.writeFile(conf, con)
@ -3804,7 +3804,7 @@ if __name__ == "__main__":
elif func == 'conf': elif func == 'conf':
print(getConf()) print(getConf())
elif func == 'bin_log': elif func == 'bin_log':
print(binLog()) print(binLog(version))
elif func == 'binlog_list': elif func == 'binlog_list':
print(binLogList()) print(binLogList())
elif func == 'clean_bin_log': elif func == 'clean_bin_log':

Loading…
Cancel
Save