CodeIgniter Forums
MySQL socket error ? - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: MySQL socket error ? (/thread-20369.html)

MySQL socket error ? - El Forum - 07-07-2009

I noticed a couple of errors in my error log today. They were spaced exactly 1 minute apart, and wondering what might this be:

Quote:An error occurred in script '/var/www/system/database/drivers/mysql/mysql_driver.php' on line 66:
<br />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)

My site is working fine as far as I know. I haven't had this error before, and can't reproduce it.

MySQL socket error ? - El Forum - 07-07-2009

That's usually what you get when you try to make a mysql connection on a host/port that isn't running mysql. It may also happen if traffic is significant enough that it would refuse the connection, but I haven't encountered that. You could check your logs to see how busy the server was then, but I wouldn't worry about it too much.

MySQL socket error ? - El Forum - 07-07-2009

Well, then perhaps it was just a server error, because my site is not a high traffic site by any means. I tend to freak out when I see errors, so I hope you are right, and it is nothing to worry about.