1
I inadvertently issued rm /tmp as root and thus mysql.sock was destroyed. Therefore, I started getting this error even after I restarted the mysqld:
This page cannot be displayed due to an internal error.
If you are the administrator of this site, please visit the XOOPS Troubleshooting Page for assistance.
Warning [PHP]: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in file
-----
Why is php looking for /tmp/mysql.sock while my daemon is creating it in /var/run/mysqld/mysqld.sock?
How do I recreate the socket in /tmp?
-----
Therefore, I did killall mysqld and /etc/init.d/msyqld start and the process started and I was able to do
mysql -u root -p
and issued 'status' and got
mysql Ver 12.21 Distrib 4.0.14, for pc-linux-gnu (i686)
Connection id: 2
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Server version: 4.0.14-log
Protocol version: 10
Connection: Localhost via UNIX socket
Client characterset: latin1
Server characterset: latin1
UNIX socket: /var/run/mysqld/mysqld.sock
Uptime: 1 min 57 sec