报错:

mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) [include/db.inc.php:77]
Error connecting to database [Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)]


解决办法:


给/tmp/mysql.sock设置个软连接:

ln -s /tmp/mysql.sock  /var/lib/mysql/mysql.sock



这样zabbix就可以找到mysql的sock了