Question

How to restart the database "Error Establishing a Database Connection"?

Posted December 10, 2019 1.3k views
ApacheDatabases

Hello everyone,

My website is currently down and here is the massage: “Error Establishing a Database Connection” - here is the screenshot: https://prnt.sc/q9199z

I`m not pretty sure this command will work or not to fix it: sudo systemctl start mysql

I`am afraid to broke something and will appreciate any help.

Thanks

edited by alexdo

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.

×
2 answers

Hello, @mrinsta

I can see that the website is now loading fine. Could you please let us know what was the exact issue here and how you were able to solve it?

You need to make sure that MySQL/MariaDB is running before further checking the site for other errors. If MySQL/MariaDB is running then you would need to further investigate the problem.

Usually it’s good to check the Nginx/Apache error log for further details and to double check the database credentials and make sure that they’re working fine.

Regards,
Alex

Hello, request you to refer to below link, which would help you in troubleshooting the Database error:

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

Best Regards,
Sri Charan

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...
Submit an Answer