1
haisam
UREGENT: deleted /tmp/mysql.sock by mistake!!!!!!!
  • 2004/9/4 18:52

  • haisam

  • Just popping in

  • Posts: 45

  • Since: 2003/11/11


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


2
haisam
Re: UREGENT: deleted /tmp/mysql.sock by mistake!!!!!!!
  • 2004/9/4 18:58

  • haisam

  • Just popping in

  • Posts: 45

  • Since: 2003/11/11


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

fixed the problem!!

Login

Who's Online

149 user(s) are online (105 user(s) are browsing Support Forums)


Members: 0


Guests: 149


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits