Question

Error establishing a database connection

Posted May 24, 2019 432 views
UbuntuWordPress

I get this error when trying to load my wordpress site, does this have anything to do with the BLR1 Networking Issue notice that I get when I log into digitalocean?

“Error establishing a database connection”

“The network problems in our BLR1 region have returned and we are actively working to improve and monitor the state of the network. Users may experience latency and/or connectivity issues during this time. We will post an update when we have additional information or once the issue is fully resolved.”

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

This is due to a problem with your server, nothing to do with the networking.
Try checking your error logs including apache2/nginx error.log and mysql error.log. If your error logs say such as cannot allocate memory, then you should consider upgrading your droplet to one with more RAM.

Rebooting your server should fix the issue but you need to dig deeper if it keeps happening.

This happened to one of my local sites a few months back. There’s a really easy to follow guide here at https://mythemeshop.com/blog/fix-the-error-establishing-database-connection-in-wordpress/ that has a video as well on how to solve it

Submit an Answer