Report this

What is the reason for this report?

Apache2 and MySql keep stopping

Posted on July 31, 2013

I have a DO Droplet server and every day or so I have to restart apache2 and mysql -

“CRI: Error connecting to MySQL Server: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (111) (#2002) - the site owner should contact their hosting provider for assistance.”

when access the website. Why is this happening, and how to fix it please? Many thanks Pa



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Thanks for the help. Just waiting for it to stop again now so that I can check the logs. Things never break when you want them to lol <br>

May I revive this topic. My mysql service kept stopping and showing this error to end user

DibiDriverException: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

this command show nothing

tail /var/log/mysql.err

using the lowest DO droplet specs

Please help

Sorry for the multiple posts - DO kept telling me there was an error when posting and to try again!!! <br>512MB / 1 CPU <br>20GB SSD DISK <br>1TB TRANSFER <br> <br>paul@PaulAsher:~$ cat /etc/*-release <br>DISTRIB_ID=Ubuntu <br>DISTRIB_RELEASE=12.04 <br>DISTRIB_CODENAME=precise <br>DISTRIB_DESCRIPTION=“Ubuntu 12.04.2 LTS” <br>NAME=“Ubuntu” <br>VERSION=“12.04.2 LTS, Precise Pangolin” <br>ID=ubuntu <br>ID_LIKE=debian <br>PRETTY_NAME=“Ubuntu precise (12.04.2 LTS)” <br>VERSION_ID=“12.04” <br> <br>I followed DO’s intructions to the letter when building the server which include tweaking apache2.conf (I think) but do not recall my.cnf changes. <br>What do I need to do with them to fix this? <br>Thanks <br>Paul <br>

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.