If you open your site and get error: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (111), You can read this tutorial to find a solution.
Why this error occur?
As to us, the reason for this error is there is no space in our vps. We should delete some files and directories.
As to ubuntu system, we can delete files and directories with rm command. Here is a tutorial.
How to fix this error?
The first way is to delete some files and directories
Then you can reboot ubuntu. To reboot ubuntu, you can read:
Then you will find this error may be fixed. If not, you can restart mysql with command:
You can connect mysql successfully.