Question

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

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


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, 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

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