現象:
配置zabbix告警動做時,出現如下錯誤:
Error in query [INSERT INTO auditlog (userid,clock,ip,action,resourcetype,details,auditid) VALUES ('1','1562247337','123.155.146.109','0','5','名稱: gaojing','1018')] [Incorrect string value: '\xE5\x90\x8D\xE7\xA7\xB0...' for column 'details' at row 1]
問題:
是mysql中字符問題,latin1不能夠
解決:
先將數據導出,vim 編輯 zabbix.sql,通常模式下將 latin1 全局替換爲 utf8 mysql
[root@xx ~]# mysqldump -uroot -p123456 --default-character-set=utf8 zabbix > zabbix.sql Warning: Using a password on the command line interface can be insecure. [root@xx ~]# vim !$ vim zabbix.sql :1,$s/latin1/utf8/g [root@xx ~]# mysql -uroot -p123456 --default-character-set=utf8 zabbix < zabbix.sql Warning: Using a password on the command line interface can be i
以後再從新添加就能夠了
sql
問題解決!!!
其實還能夠直接將 Report problems to Zabbix administrators 啓用便可vim