xoops forums

haisam

Just popping in
Posted on: 2004/9/4 18:52
haisam
haisam (Show more)
Just popping in
Posts: 45
Since: 2003/11/11
#1

UREGENT: deleted /tmp/mysql.sock by mistake!!!!!!!

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

haisam

Just popping in
Posted on: 2004/9/4 18:58
haisam
haisam (Show more)
Just popping in
Posts: 45
Since: 2003/11/11
#2

Re: UREGENT: deleted /tmp/mysql.sock by mistake!!!!!!!

ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock

fixed the problem!!