MySQL suddenly started failing

Hi guys,

I’ve ran into trouble and I want to fix it on my own however I would pretty much need some pointers.

My MySQL service went down and I’m unsure on how to start troubleshooting it.

Can you guys assist?

Submit an answer
Answer a question...

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.

Site Moderator
Site Moderator badge
September 4, 2019
Accepted Answer

Hi @Remdore,

Your questions is quite generic but I’ll try and lend you some pointers on which you can start.

Check Disk Space

If your droplet is full, services like mysql,apache,nginx etc. will start failing as they can’t create the proper sockets to start themselves.

Check the current disk usage

df -h

That will show you all your partions and the size they are using. If your server is full let me know and I’ll provide you with pointers on what to check and clear.

Now onto the good stuff

**Your MySQL might have been corrupted. **

In order to check that, you can check your mysql error log. Your error log should be defined in your my.cnf file. If you are not sure where it is, you can do the following

locate my.cnf

It’s usually at /etc/my.cnf

Once you find it, open it with your favourable editor and see if there is a line like

 log_error = /var/log/mysql/error.log

If there isn’t try adding the line and restarting MySQL.

Once you do, the error log should appear and it should say what the problem is.

If you run into trouble, post the contents of it and I’ll help out.

Kind regards, Kalin D.

I managed to start MySQL but in the log it says that a table has crashed on my DB.

Should I just go and try to repair it or is there something else to be done?

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.