zabbix connection to database 'zabbix' failed:
来源:互联网 发布:ceic数据库 编辑:程序博客网 时间:2024/05/22 09:07
在启动zabbix时启动失败,查看日志:
[root@localhost zabbix]# tailf /tmp/zabbix_server.log 24661:20170523:203250.916 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 24661:20170523:203250.916 database is down: reconnecting in 10 seconds 24661:20170523:203300.916 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 24661:20170523:203300.916 database is down: reconnecting in 10 seconds 24661:20170523:203310.917 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 24661:20170523:203310.917 database is down: reconnecting in 10 seconds 24661:20170523:203320.918 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 24661:20170523:203320.918 database is down: reconnecting in 10 seconds 24661:20170523:203330.920 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 24661:20170523:203330.920 database is down: reconnecting in 10 seconds
发现日志链接不上
[root@localhost zabbix]# ll /var/lib/mysql/mysql.sockls: cannot access /var/lib/mysql/mysql.sock: No such file or directory[root@localhost zabbix]# ll /var/lib/mysqlls: cannot access /var/lib/mysql: No such file or directory
可以知道是/var/lib/mysql/mysql.sock不存在
在系统中查找mysql.sock文件:
[root@localhost zabbix]# find / -name mysql.sockfind: ?.run/user/1000/gvfs?. Permission denied/tmp/mysql.sock可以知道是在/tmp/下,这个时候有两种方式解决这个问题:
1)做mysql.sock的链接
[root@localhost lib]# mkdir /var/lib/mysql[root@localhost lib]# ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock[root@localhost lib]# /etc/rc.d/init.d/mysqld restartShutting down MySQL... SUCCESS! Starting MySQL SUCCESS!
2)修改zabbix_server.conf中的mysql.sock的配置
vim /etc/zabbix/zabbix_server.confDBSocket=/tmp/mysql.sock再重启zabbix就好
阅读全文
2 0
- zabbix connection to database 'zabbix' failed:
- zabbix: failed to accept an incoming connection
- [Z3001]connection to database 'zabbix' failed: [1040] Too many connections 问题及处理
- Zabbix
- zabbix
- zabbix
- zabbix
- zabbix
- zabbix
- ZABBIX
- zabbix
- ZABBIX
- Zabbix
- zabbix
- Zabbix
- zabbix
- zabbix
- Zabbix
- 火星人
- 排序-插入排序-希尔排序(缩小增量排序)-数据结构(28)
- linux系统命令_Chapter_启动流程
- JavaWeb 会话管理(cookie)
- menu
- zabbix connection to database 'zabbix' failed:
- error:"XXX" is not translated in "af" (Afrikaans), "am" (Amharic), "ar" (Arabic)...
- Matlab保存图片背景为透明
- (五)Paint 画笔基本的使用
- TCP
- python的=和+=
- scala字符串变量替换
- 机器人塔
- *线段树(区间修改)