From d89ab5c45f0813c5ca8c70ea5c0500d25e50abcb Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Tue, 16 Jul 2024 01:30:57 +0800 Subject: [PATCH] Update index.py --- plugins/zabbix/index.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/zabbix/index.py b/plugins/zabbix/index.py index f29709b0d..6be5817d6 100755 --- a/plugins/zabbix/index.py +++ b/plugins/zabbix/index.py @@ -177,9 +177,11 @@ def zabbixImportMySQLData(): find_zabbix_version = pmdb.query("show tables like 'dbversion'") if len(find_zabbix_version) == 0: # 初始化导入数据 + pmdb.query("set global log_bin_trust_function_creators=1") # zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | /www/server/mysql/bin/mysql --default-character-set=utf8mb4 -uzabbix -p"LGhb1f7QG6SDL5CX" zabbix import_data_cmd = 'zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | /www/server/mysql/bin/mysql --default-character-set=utf8mb4 -uzabbix -p"'+db_pass+'" zabbix' mw.execShell(import_data_cmd) + pmdb.query("set global log_bin_trust_function_creators=0") php_src_tpl = getPluginDir()+'/conf/zabbix.conf.php'