zabbix配置时,出现在mysql错误.
初始配置,测试连接时出现如图错误.
大家怎么解决这个错误的?
mysql重启,重新配置了socket文件, 但如图的错误始终指向原来的socket文件. 晕死.
做个ln吧,这样应该就可以 了 谢谢badb0y!
数据库mysql装在用户 mysql下. 也是用mysql启动的.
zabbix装在用户 zabbix下. 也是用zabbix启动工zabbix_server的.
做了ln还是一样的错误, 有没有什么办法, 数据库连接不走socket?
直接连接是没问题的:
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)
做完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)
zabbix_server.conf
里面可以指定socket的
页:
[1]