Question

Urgent- site is down due to database connection

Posted December 17, 2021 96 views
Databases

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.

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.

×
Submit an Answer
1 answer

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

by Brian Boucheron
WordPress is one of the most popular open source content management systems in the world. Although it started out focused on blogging, over the years it has developed into a more flexible platform for websites in general. After almost fifteen years of development it is quite polished and robust, yet issues can still come up. If you've recently attempted to load your WordPress-powered website and instead saw a message stating "Error Establishing Database Connection", the cause is most often...