Bloqueo de MYSQL


estoy teniendo problemas con MYSQL. Cada 1-2 días (nunca un tiempo fijo), MYSQL se me para y no me correr ninguna web (Wordpress) y me detecta el error de conexión en la web.

Para solucionar este error tengo que conectarme por ssh y hacer:

  1. Service mysql stop
  2. Service mysql start

¿Hay alguna forma para no tener que estar haciendo esto?

Dispongo de Ubuntu 18.04.3 Muchas gracias, un saludo.

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.

Hi @administracion225549e6aab6,

It sounds like MySQL is being killed for some reason. The most common issue would be your Droplet is running out of Memory and killing MySQL so that it doesn’t crash down. Another issue might be something related to MySQL itself and nothing related to the droplet itself.

To check if it’s any of the mentioned you’ll need to go trough your log files. The first place I would recommend looking is the /var/log/messages. You’ll need to grep for either ‘kill’ or ‘oom’ messages :

grep -i kill /var/log/messages
grep -i oom /var/log/messages

Alternatively, you can try and grep for mysql in the same log for more concrete output

grep -i mysql /var/log/messages

If you see the kill and oom signals, you’ll know that your droplet is actually running out of memory. So you’ll need to look into that direction.

If you don’t see anything, you’ll need to turn your attention to the MySQL Logs. Typically, the logs are located in ‘/var/log/’. You’ll need to search for the error there. You can use ‘grep error’ in the error.

As soon as you have the error you should be able to go further and resolve it.

Regards, KDSys