Random 2002 error - Need a cpanel/mysql guru!

Stuck

Member
Jan 13, 2005
11
0
151
Hello,
I am getting a random error on my site.
The error is the following:

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

This only happens every now and again, sometimes it could be every 10 page loads, sometimes once every few hundred.

Does anyone know what could be causing this?
I am running the latest MySQL and PHP versions.

Thanks!
 

AndyReed

Well-Known Member
PartnerNOC
May 29, 2004
2,217
4
193
Minneapolis, MN
Make sure your Php scripts closes after using any of your server services. You also need to check on the errors in the log file which might lead to to the cause of the crash.