当前位置:首页 > 技术文章 > 正文内容

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

lcy2020-01-16技术文章2764

[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



 

版权声明:本文由cy's Blog发布,如需转载请注明出处。

本文链接:https://www.c3389.com/post/461.html

相关文章

个人浅谈asp大马解密

suwey从本人接触asp大马以来,很多asp马都是采用了各种方法进行加密,这当然达到了免杀效果,但也无疑让我等小菜感到无奈,还记得最初居然想通过看加密函数,然后自己对着密文倒着写(这个够蠢啦)来解密...

phpwind 默认模版,将顶部蓝灰色的去掉

CSS里.head-wrap{background:#6f94b7 url(images/wind/head-top.png) 0 top repeat-x;}图片换掉,背景色代码换掉...

超详细的脚本入侵知识总结

什么是脚本 脚本是指全部网页编程语言的一个代名词2.什么是脚本入侵脚本入侵是指利用网页编程语言进行入侵的行为3.什么要学习脚本入侵现在我问你一个问题:你觉得入侵一个网站,也可以说拿下一个服务器,比起入...

Administrator高级目录入侵方法

在本文中,目标机器的名称是ntsvr2,目标机器的域名是www.xxx.com,目标机器上有scripts和cgi-bin目录,scripts目录下有uploadn.asp等asp程序,可能有gues...

手工渗透,陈振肖太极网

 from:归零 推荐先看下这篇文章:http://huaidan.org/archives/2276.htmlhttp://www.czxtaiji.net/content.ph...

hyper-v如何查看VPS占用的硬盘IO情况?

 有时候您会发现物理机的硬盘非常卡,怎么处理呢? 您可以在windows 2012的服务器上,打开任务管理器,点性能,再点左下角的“打开资源监视器”,再点磁盘,一会...

发表评论

访客

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