[Z3001] connection to database 'zabbix' failed: [2003] Can't connect to MySQL server on '192.168.6.7' (13)

问题:启动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 '192.168.6.7' (13)

原文地址:https://www.cnblogs.com/sq5288/p/11545842.html

时间: 2024-08-08 09:39:57

[Z3001] connection to database 'zabbix' failed: [2003] Can't connect to MySQL server on '192.168.6.7' (13)的相关文章

zabbix setup ERROR:4993:20141229:183010.680 [Z3001] connection to database 'zabbix' failed:

错误提示: 4689:20141229:182600.308 Cannot connect to the database. Exiting...   4993:20141229:182600.599 Starting Zabbix Server. Zabbix 2.2.1 (revision 40808).   4993:20141229:182600.599 ****** Enabled features ******   4993:20141229:182600.599 SNMP moni

[Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)

在配置了zabbix服务端后,发现:"zabbix server is running"的Value值是"no", 用:netstat -atnlp|grep 10051 发现没有出现zabbix_server的10051端口.在网上找了很多办法,发现都不管用. 通过查看日志看到如下错误提示: tail /tmp/zabbix_server.log 解决方法: 用root帐号登录mysql 然后执行: mysql> grant all on zabbix.*

【转】ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.1.165' (113)

原文转自:http://blog.csdn.net/chengyuqiang/article/details/54285857 1.程序报错: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link 2.尝试远程连接数据库: [[email protected] ~]# mysql -h192.168.1.165 -uroot -p123456 ERROR 2003 (HY000): Can't c

ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.56.105' (113)

[[email protected] ~]# mysql -uroot -h192.168.56.105 -p Enter password: ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.56.105' (113) 问题的分析 出现上述问题,可能有以下几种可能 1. my.cnf 配置文件中 skip-networking 被配置 skip-networking 这个参数,导致所有TCP/IP端口没有被监听,也就是说

MySQL 数据库连接失败 SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (13)

CentOS6.5x64 安装禅道6.2,生成配置文件,数据库连接失败 数据库连接失败 SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (13) root,密码肯定没有错(命令行可以登录),用的127.0.0.1 PHP安装正常,MySQL配置正确,PHP的PDO.MySQL扩展正确,使用 <?php $link=mysql_connect('localhost','root','password'); if

ERROR 2003 (HY000): Can&#39;t connect to MySQL server on &#39;192.168.33.10&#39; (111) 解决方法

谷歌了一下之后,原来是在mysql的my.cnf中有下面一段代码: # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. bind-address = 127.0.0.1 #这里默认监听本地localhost 如果要让mysql监听到其他的地址,可以将bind-address = 127.0.0.1

Linux中mysql进入命令行报错:MYSQL ERROR 2003 (HY000): Can&#39;t connect to MySQL server on &#39;192.168.99.192&#39; (111)

场景:在Linux中安装mysql01和mysql02,通过VIP虚出一个VIP=192.168.99.192,mysql01为主ip为192.168.99.153,mysql02为备机ip为192.168.99.154 此时VIP在mysql01上通过 mysql01上连接VIP :mysql -h 192.168.99.192 -P 3306   结果是可以正常进入mysql命令行: 通过mysql02上远程连接VIP 会在界面上报错:mysql error 2003(HY000):Can'

ERROR 2003 (HY000): Can&#39;t connect to MySQL server on &quot;192.168.xxx.xxx&quot; (111)

mac  homebrew 安装的mysql5.6 除本机外无法被其他ip的电脑访问. 网上查原因 有几个: 1.my.cnf配置中 查看是否有   bind-address = 127.0.0.1  和  skip-networking  前面加 #注释掉. 注意:homebrew安装的mysql有好几个配置文件,不确定的可以查找一下. sudo find / -name my.cnf #skip-networking #bind-address = 127.0.0.1 我的mac中找到4个,

【zabbix】connection to database &#39;zabbix&#39; failed: [1045] Access denied for user &#39;root&#39;@&#39;localhost&#39; (using password: NO)

前面安装的我就不说了,度娘上的很多: 关键是这个问题,网上的比较多,但是没有发现有用的: 问题:zabbix server is runing No 日志:/tmp/zabbix_server.log connection to database 'zabbix' failed: [1045] Access denied for user 'root'@'localhost' (using password: NO) 解决过程: 1)找到安装目录: [[email protected] init