[Z3001] connection to database 'zabbix' failed: [2003] Can't connect to MySQL server on
Posted sq5288
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[Z3001] connection to database 'zabbix' failed: [2003] Can't connect to MySQL server on相关的知识,希望对你有一定的参考价值。
问题:启动zabbix-server的时候,使用ss -tnl发现15001并未被监听,查看/var/log/zabbixsrv/zabbix_server.log 日志,提示:
2628:20190918:214402.782 [Z3001] connection to database ‘zabbix‘ failed: [2003] Can‘t connect to mysql server on ‘192.168.6.7‘ (13)
2628:20190918:214402.782 Database is down. Reconnecting in 10 seconds.
主机程序运行状态:
service zabbix-service status 程序运行正常
service iptables status 显示防火墙已关闭
getenforce 显示Enforcing
配置参数:
DBHost=192.168.6.7
DBName=zabbix
DBUser=zbxuser
DBPassword=zbxpass
# ListenIP=0.0.0.0 # 开启的话,只监听IPV4,不开启,IPV4/IPV6都监听。
数据库配置:
| zbxuser | 192.168.%.% | *24E65C3D3577DA6C2A596788CEAA02923A74B75D |
| zbxuser | localhost | *24E65C3D3577DA6C2A596788CEAA02923A74B75D |
原因:SELINUX未关闭,setenforce 0,然后重新启动zabbix-service,端口监听正常。
以上是关于[Z3001] connection to database 'zabbix' failed: [2003] Can't connect to MySQL server on的主要内容,如果未能解决你的问题,请参考以下文章
Siebel Error: Unable to create the Business Service '(SBL-DAT-00227)
message [Failed to convert property value of type [java.lang.String] to required type [java.util.Dat
mongodb Failed to start LSB: An object/document-oriented dat
idea点击RUN启动报错: Broken configuration due to unavailable plugin or invalid configuration dat
start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: