One of my droplets is reporting that it cannot connect to the MySQL server. I’ve tried rebooting the droplet a couple of times but it hasn’t made any difference. If I try connecting to the database via SSH get the following error:
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)
The droplet is running LAMP on Ubuntu 12.04, and is running a single website (MediaWiki). It’s been fine since I set it up a couple of months ago. I haven’t made any changes to the MediaWiki codebase or to the MySQL database itself since I set it up (apart from adding content to the wiki), so I don’t really understand why it’s suddenly stopped working now.
Any ideas where to start? Where should I be looking re: log files etc?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.