From 3f96854d9a923159ae86d03a1fe2c5592b0b6da8 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Mon, 10 Jun 2024 01:13:13 +0800 Subject: [PATCH] update --- plugins/mysql-apt/index.py | 11 +++++------ plugins/mysql-apt/install.sh | 1 + plugins/mysql-apt/js/mysql-apt.js | 2 +- plugins/mysql-apt/scripts/backup.py | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/mysql-apt/index.py b/plugins/mysql-apt/index.py index b756d9196..788aa9f34 100755 --- a/plugins/mysql-apt/index.py +++ b/plugins/mysql-apt/index.py @@ -2937,14 +2937,14 @@ def fullSync(version=''): def installPreInspection(version): - sys = mw.execShell( - "cat /etc/*-release | grep PRETTY_NAME |awk -F = '{print $2}' | awk -F '\"' '{print $2}'| awk '{print $1}'") + cmd = "cat /etc/*-release | grep PRETTY_NAME |awk -F = '{print $2}' | awk -F '\"' '{print $2}'| awk '{print $1}'" + sys = mw.execShell(cmd) if sys[1] != '': return '不支持改系统' - sys_id = mw.execShell( - "cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F '\"' '{print $2}'") + cmd = "cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F '\"' '{print $2}'" + sys_id = mw.execShell(cmd) sysName = sys[0].strip().lower() sysId = sys_id[0].strip() @@ -2978,8 +2978,7 @@ def uninstallPreInspection(version): if __name__ == "__main__": func = sys.argv[1] - - version = "5.6" + version = '5.6' version_pl = getServerDir() + "/version.pl" if os.path.exists(version_pl): version = mw.readFile(version_pl).strip() diff --git a/plugins/mysql-apt/install.sh b/plugins/mysql-apt/install.sh index 059881983..b6faee39c 100755 --- a/plugins/mysql-apt/install.sh +++ b/plugins/mysql-apt/install.sh @@ -13,6 +13,7 @@ serverPath=$(dirname "$rootPath") # cd /www/server/mdserver-web/plugins/mysql-apt && bash install.sh uninstall 8.0 # cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql-apt/index.py start 8.0 # cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql-apt/index.py fix_db_access +# cd /www/server/mdserver-web && source bin/activate && python3 plugins/mysql/index.py do_full_sync {"db":"xxx","sign":"","begin":1} install_tmp=${rootPath}/tmp/mw_install.pl diff --git a/plugins/mysql-apt/js/mysql-apt.js b/plugins/mysql-apt/js/mysql-apt.js index 6695f8961..68aea72c7 100755 --- a/plugins/mysql-apt/js/mysql-apt.js +++ b/plugins/mysql-apt/js/mysql-apt.js @@ -870,7 +870,7 @@ function openPhpmyadmin(name,username,password){ } if (rdata.data['cfg']['choose'] != 'mysql-apt'){ - layer.msg('当前为['+rdata.choose+']模式,若要使用请修改phpMyAdmin访问切换.',{icon:2,shade: [0.3, '#000']}); + layer.msg('当前为['+rdata.data['cfg']['choose'] + ']模式,若要使用请修改phpMyAdmin访问切换.',{icon:2,shade: [0.3, '#000']}); return; } var home_page = rdata.data['home_page']; diff --git a/plugins/mysql-apt/scripts/backup.py b/plugins/mysql-apt/scripts/backup.py index b4236c6fe..992219655 100755 --- a/plugins/mysql-apt/scripts/backup.py +++ b/plugins/mysql-apt/scripts/backup.py @@ -63,7 +63,7 @@ class backupTools: if len(mycnf) > 100: mw.writeFile(db_path + '/etc/my.cnf', mycnf) - cmd = db_path + "/bin/usr/bin/mysqldump --defaults-file=" + my_conf_path + " --single-transaction -q --default-character-set=utf8 " + \ + cmd = db_path + "/bin/usr/bin/mysqldump --defaults-file=" + my_conf_path + " --single-transaction -q --default-character-set=utf8mb4 " + \ name + " | gzip > " + filename mw.execShell(cmd)