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

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?

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel