Can't connect to local MySQL server through socket 
If you are getting this error, it means either:

1. The info in your config.php file is wrong (in which case your forums wouldn't work at all), or

2. MySQL crashed, it's not running or it can't find the socket. You need to contact your host about this. Here is more info on this error:

MySQL 5.1:
http://dev.mysql.com/doc/refman/5.1/en/can-not-connect-to-server.html

MySQL 5.0:
http://dev.mysql.com/doc/refman/5.0/en/can-not-connect-to-server.html

MySQL 3.23, 4.0, 4.1:
http://dev.mysql.com/doc/refman/4.1/en/can-not-connect-to-server.html

In Windows:
http://dev.mysql.com/doc/refman/5.1/en/can-not-connect-to-server-on-windows.html
http://dev.mysql.com/doc/refman/5.0/en/can-not-connect-to-server-on-windows.html

3. In the rare instance that this server is not using the default MySQL port (3306) then you will need to edit config.php to change this to the port it is using:

$config['MasterServer']['port'] = xxxx;

...with 'xxxx' being the port number.
User Contributed Notes: Can't connect to local MySQL server through socket Add a Comment