Question

Urgent- site is down due to database connection

We are having database connection issue today. It was working perfectly. Database name is - “newbettingsites”. I tried to reboot server and also restarted MySQL but no luck. Kindly help.


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.

Hello,

It sounds like that your MySQL service might be crashing or the database credentials that you are using could be incorrect.

What I could suggest is checking the following:

  • Make sure that the MySQL service is working as expected:
sudo systemctl status mysql
  • Check the MySQL error log in case that the service is not starting:
sudo tail -100 /var/log/mysql/error.log
  • If you are using WordPress, I could suggest going through this tutorial here that covers the best approach in troubleshooting database connection problems:

https://www.digitalocean.com/community/tutorials/how-to-debug-the-wordpress-error-establishing-database-connection

For more information on how to troubleshoot common MySQL problems make sure to check out this tutorial here:

https://www.digitalocean.com/community/tutorial_series/how-to-troubleshoot-issues-in-mysql

Let me know how it goes. Best, Bobby