0

For two minutes today my users were seeing this error:

[03-Jul-2013 13:30:58] PHP Warning:  mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

What's the cause of this? It randomly came and went just as quickly. It happened for a couple of minutes yesterday too. Is it my host's problem? Or a problem with my script? Thanks in advance.

user2482397
  • 43
  • 1
  • 3
  • http://forums.oscommerce.com/topic/90342-cant-connect-to-local-mysql-server-through-socket/ – Naveen Kumar Alone Jul 05 '13 at 18:25
  • 2
    possible duplicate of [Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (38)](http://stackoverflow.com/a/8084959/342740) – Prix Jul 05 '13 at 18:26
  • What's the code of the script in question? – Justice Cassel Jul 05 '13 at 18:27
  • 1
    And... use mysqli. http://www.php.net/manual/en/class.mysqli.php – Karo Jul 05 '13 at 18:28
  • This is most certainly not a duplicate. The other question seems to imply that the user is having a persistent problem, where as this question is inquiring into the nature of a random lockout. I just ran into this problem today, and seeing this question being tossed aside like rotten cabbage irritates me greatly. – Axle Jul 18 '14 at 14:48

0 Answers0