Why do I get a MySQL “Can connect to local MySQL server through socket” error?
This indicates that PHP cannot communicate with your MySQL server. Check to make sure that MySQL is running, and verify that it’s actually on the server where you think it is. If MySQL is running on your local system try using the IP address for your host (which should be 127.0.0.1) instead of “localhost” for your database and see if that fixes the problem. For other diagnostics you can try, take a look at http://dev.mysql.com/doc/refman/5.0/en/can-not-connect-to-server.
Related Questions
- ACID cannot connect to the database server. Is it possible that PostgreSQL is only accepting connections through a local socket?
- Why do I get this MySQL error: Can connect to local MySQL server through socket /var/lib/mysql/mysql.sock (2) 0?
- Why do I get a MySQL "Can connect to local MySQL server through socket" error?