This commit is contained in:
Mr Chen
2024-06-13 20:21:43 +08:00
parent f1eac4f309
commit 525bcc909f
3 changed files with 12 additions and 12 deletions
+4 -4
View File
@@ -323,7 +323,7 @@ def getPidFile():
return tmp.groups()[0].strip()
def binLog():
def binLog(version = ''):
args = getArgs()
conf = getConf()
con = mw.readFile(conf)
@@ -334,7 +334,7 @@ def binLog():
con = con.replace('#log-bin=mysql-bin', 'log-bin=mysql-bin')
con = con.replace('#binlog_format=mixed', 'binlog_format=mixed')
mw.execShell('sync')
restart()
restart(version)
else:
path = getDataDir()
if 'status' in args:
@@ -348,7 +348,7 @@ def binLog():
con = con.replace('log-bin=mysql-bin', '#log-bin=mysql-bin')
con = con.replace('binlog_format=mixed', '#binlog_format=mixed')
mw.execShell('sync')
restart()
restart(version)
mw.execShell('rm -f ' + path + '/mysql-bin.*')
mw.writeFile(conf, con)
@@ -3804,7 +3804,7 @@ if __name__ == "__main__":
elif func == 'conf':
print(getConf())
elif func == 'bin_log':
print(binLog())
print(binLog(version))
elif func == 'binlog_list':
print(binLogList())
elif func == 'clean_bin_log':