免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 7903 | 回复: 5
打印 上一主题 下一主题

[其他] zabbix配置时,出现在mysql错误. [复制链接]

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2016-04-12 06:20:00
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-05-12 17:11 |只看该作者 |倒序浏览

初始配置,测试连接时出现如图错误.

大家怎么解决这个错误的?

mysql重启,重新配置了socket文件, 但如图的错误始终指向原来的socket文件. 晕死.

zabbix_error.PNG (6.57 KB, 下载次数: 35)

zabbix_error.PNG

论坛徽章:
2
2015年辞旧岁徽章
日期:2015-03-03 16:54:1515-16赛季CBA联赛之上海
日期:2016-05-05 09:45:14
2 [报告]
发表于 2014-05-12 17:32 |只看该作者
做个ln吧,这样应该就可以 了

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2016-04-12 06:20:00
3 [报告]
发表于 2014-05-12 17:51 |只看该作者
谢谢badb0y!

数据库mysql装在用户 mysql下. 也是用mysql启动的.
zabbix装在用户 zabbix下. 也是用zabbix启动工zabbix_server的.

做了ln还是一样的错误, 有没有什么办法, 数据库连接不走socket?

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2016-04-12 06:20:00
4 [报告]
发表于 2014-05-12 17:52 |只看该作者
直接连接是没问题的:

mysql> show full processlist
    -> ;
+----+--------+-----------+------+---------+------+-------+-----------------------+
| Id | User   | Host      | db   | Command | Time | State | Info                  |
+----+--------+-----------+------+---------+------+-------+-----------------------+
|  5 | zabbix | localhost | NULL | Query   |    0 | init  | show full processlist |
+----+--------+-----------+------+---------+------+-------+-----------------------+
1 row in set (0.00 sec)

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2016-04-12 06:20:00
5 [报告]
发表于 2014-05-12 18:07 |只看该作者
做完ln -s后,直接指定socket连接也没问题

[root@devdb01 logs]# mysql -u zabbix -p --socket=/var/lib/mysql/mysql.sock
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.6.16-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show full processlist;
+----+--------+-----------+------+---------+------+-------+-----------------------+
| Id | User   | Host      | db   | Command | Time | State | Info                  |
+----+--------+-----------+------+---------+------+-------+-----------------------+
|  7 | zabbix | localhost | NULL | Query   |    0 | init  | show full processlist |
+----+--------+-----------+------+---------+------+-------+-----------------------+
1 row in set (0.00 sec)

论坛徽章:
2
2015年辞旧岁徽章
日期:2015-03-03 16:54:1515-16赛季CBA联赛之上海
日期:2016-05-05 09:45:14
6 [报告]
发表于 2014-05-26 12:18 |只看该作者
zabbix_server.conf
里面可以指定socket的
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP