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

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

lcy1年前 (2020-01-16)技术文章1629

[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

相关文章

golang 跨平台编译windows 程序

安装 gcc-mingw-w64apt-get install gcc-mingw-w64跨平台编译 生成 64位 exe 可执行文件.env CGO_ENABLED=1...

沸腾新闻系统v0.45拿SHELL

沸腾新闻系统v0.45拿SHELL

作者:st0p转载请注明出处:http://www.st0p.org注:已提醒目标站管理员补洞.看到群里的無材发来一站,打开看了一下,很像是沸腾新闻系统,不过版本写的是V0.1,网上没找到相应的版本,...

CSS 简介

首先学习CSS 样式解决了一个普遍的问题HTML 标签原本被设计为用于定义文档内容。通过使用 <h1>、<p>、<table> 这样的标签,HTML 的初...

Windows VL密钥对照表

Windows VL密钥对照表Windows Server 2016操作系统KMS激活序列号Windows Server 2016 DatacenterCB7KF-BWN84-R7R2Y-793K2-...

Lcx进行内网端口转发教材

Lcx进行内网端口转发教材

通过本案例可以学习到:   (1)了解端口转发方面的相关知识  (2)使用工具软件lcx来进行端口转发  Lcx.exe是一个端口转发工具,相当于把肉鸡A上的3389端口转发到具有外网IP地址的B机上...

UltraEdit 在文件中查找不起作用

、问题:在UltraEdit中,按文件查找突然不好使,点搜索后一点反应都没有。2、解决:在C盘的APPDATA中找到UltraEdit的存储的数据,将其删除,例如,将下列目录删除C:\Users\【用...

发表评论

访客

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