5

Connections are through localhost, using the mysqld sock file. These are working 99+% of the time, but under some weird conditions I get the error:

SQLSTATE[HY000] [2002] No such file or directory 

The same pages will work again on the next request.

The only thing I can think of is some kind of strange filesystem error.

KingCrunch
  • 124,572
  • 19
  • 146
  • 171
Jay Janssen
  • 131
  • 1
  • 6

2 Answers2

3

It turns out mysql getting restarted would cause this error. :p And this site won't let you answer your own question right away for some reason. Thanks for the help.

Jay Janssen
  • 131
  • 1
  • 6
0

Could be a file permission problem on the sock file.

Mine is in /var/run/mysqld and ls -l of it looks like this

srwxrwxrwx 1 mysql mysql 0 May 14 06:28 mysqld.sock
akc42
  • 4,699
  • 5
  • 39
  • 57