Update index.py

This commit is contained in:
Mr Chen
2024-07-16 01:30:57 +08:00
parent c3c536632d
commit d89ab5c45f
+2
View File
@@ -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'