51itpub 发表于 2014-05-12 17:11

zabbix配置时,出现在mysql错误.


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

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

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

badb0y 发表于 2014-05-12 17:32

做个ln吧,这样应该就可以 了

51itpub 发表于 2014-05-12 17:51

谢谢badb0y!

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

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

51itpub 发表于 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)

51itpub 发表于 2014-05-12 18:07

做完ln -s后,直接指定socket连接也没问题

# 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)

badb0y 发表于 2014-05-26 12:18

zabbix_server.conf
里面可以指定socket的
页: [1]
查看完整版本: zabbix配置时,出现在mysql错误.