zabbix启动web界面提示:Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
问题
zabbix启动web界面提示:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
解决
这是由于修改mysql服务的了socket文件mysql.sock位置,而导致无法通过mysql socket文件连接到mysql服务引起的,具体解决办法如下:
# vim /etc/my.cnf
我们需要修改/etc/my.ini文件:加上一行。
mysql.default_socket = /storage/db/mysql/mysql.sock