MySQL drops out every few days?

  • Posted on September 26, 2012
  • ryan1Asked by ryan1

So I have followed the tutorial to Install Wordpress, Nginx, PHP, and Varnish on Ubuntu 12.04. The process was smooth and easily installed, so no problems there.

The issue is every few days the MySQL connect drops out and when I run the command: $ sudo service mysql start

I get a the following message: $ start: Job failed to start

The other issues is when it first happened, I looked into setting up a script to run in cron every 5 minutes.

ps auxw | grep mysql | grep -v grep > /dev/null
if [ $? != 0 ]
    sudo service mysql start > /dev/null

Then added this to $ cron -e

*/5 * * * * ~/

But that is not working either, any thoughts or help would be greatly appreciated.

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Swap fixed my issues

I had same problem, setting up the swap fixed it for me.