From 3cdd7027d6dadc408d1f4b6427dfca144fc07d99 Mon Sep 17 00:00:00 2001 From: dami Date: Tue, 25 Mar 2025 12:45:42 +0800 Subject: [PATCH] Update index.py --- plugins/mariadb/index.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/mariadb/index.py b/plugins/mariadb/index.py index 4fd9ed3b5..dad563e5b 100755 --- a/plugins/mariadb/index.py +++ b/plugins/mariadb/index.py @@ -280,6 +280,7 @@ def binLog(): return mw.returnJson(False, '0') con = con.replace('#log-bin=mysql-bin', 'log-bin=mysql-bin') con = con.replace('#binlog_format=mixed', 'binlog_format=mixed') + mw.writeFile(conf, con) mw.execShell('sync') restart() else: @@ -294,11 +295,12 @@ def binLog(): return mw.returnJson(True, dsize) con = con.replace('log-bin=mysql-bin', '#log-bin=mysql-bin') con = con.replace('binlog_format=mixed', '#binlog_format=mixed') + mw.writeFile(conf, con) mw.execShell('sync') restart() mw.execShell('rm -f ' + path + '/mysql-bin.*') - mw.writeFile(conf, con) + return mw.returnJson(True, '设置成功!') def binLogList():