cy's Blog

好好学习 天天上网

宝塔控制面板配置zabbix连不上数据库

[root@localhost etc]# tail -f /var/log/zabbix_server.log
1267:20130722:195451.493 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
1267:20130722:195451.493 Database is down. Reconnecting in 10 seconds.
1267:20130722:195501.494 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
1267:20130722:195501.494 Database is down. Reconnecting in 10 seconds.
1267:20130722:195511.494 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
1267:20130722:195511.494 Database is down. Reconnecting in 10 seconds.
1267:20130722:195521.495 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
1267:20130722:195521.495 Database is down. Reconnecting in 10 seconds.
1267:20130722:195531.495 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
1267:20130722:195531.496 Database is down. Reconnecting in 10 seconds.
1267:20130722:195541.496 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
1267:20130722:195541.496 Database is down. Reconnecting in 10 seconds.
1267:20130722:195551.498 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
1267:20130722:195551.498 Database is down. Reconnecting in 10 seconds.



解决办法


[root@localhost tmp]# mkdir /var/lib/mysql

[root@localhost tmp]# ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock

然后去宝塔重启mysql 或者命令重启/etc/rc.d/init.d/mysqld restart



发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

«   2020年1月   »
12345
6789101112
13141516171819
20212223242526
2728293031
搜索
控制面板
您好,欢迎到访网站!
  查看权限
网站分类
最新留言
    标签列表
      作者列表
      站点信息
      • 文章总数:444
      • 页面总数:2
      • 分类总数:10
      • 标签总数:0
      • 评论总数:2006
      • 浏览总数:599025

      Powered By Z-BlogPHP 1.5.2 Zero

      Copyright 2008-2017 lcy. Some Rights Reserved.