/tmp/mysql.sock errors ?
October 6th, 2009
Do following things for
Warning: mysql_connect(): Can’t connect to local MySQL server through
socket ‘/var/tmp/mysql.sock’
edit /etc/my.cnf
Make sure that it has the following:
code:——————————————————————————–[client]
port=3306
socket=/tmp/mysql.sock
[mysqld]
port=3306
socket=/tmp/mysql.sock——————————————————————————–
If not, then add the above. Save, close and then execute
service mysql start
service chksrvd start
ln -s /tmp/mysql.sock /var/tmp/mysql.sock
ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock