安装好zabbix之后,服务端一直是未运行的状态,查看zabbix_server.log日志发现是数据库一直连接失败,提示database is down: reconnecting in 10 seconds,接下www.gui2000.com为大家介绍一下解决方法,有需要的小伙伴可以参考一下:
1、页面提示:
2、错误提示:
32716:20210508:163720.596 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 32716:20210508:163720.596 database is down: reconnecting in 10 seconds 32716:20210508:163730.596 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 32716:20210508:163730.596 database is down: reconnecting in 10 seconds 32716:20210508:163740.596 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 32716:20210508:163740.596 database is down: reconnecting in 10 seconds
3、解决方法:
[[email protected] bin]# mkdir /var/lib/mysql [[email protected] bin]# ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock [[email protected] bin]# service mysql restart Shutting down MySQL.... SUCCESS! Starting MySQL.. SUCCESS!
以上就是www.gui2000.com为大家介绍的关于zabbix数据库连接失败的全部内容了,希望对大家有所帮助,了解更多相关文章请关注www.gui2000.com网!