mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
Update index.py
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user