Report this

What is the reason for this report?

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

Posted on December 10, 2019
Chris Bennett

By Chris Bennett

I`m developer - InstaMama

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



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!

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.

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.