Question

Wordpress Error - "Error Establishing Connection"

Posted October 27, 2020 133 views
WordPress

Hello,

I just launched a droplet of $5 for my new wordpress blog. i was customizing it and one error continuously appearing.

Website has no content but still it shows the following error

“Error Establishing Connection”

how to solve this?

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.

×
5 answers

Its “Error Establishing Database Connection”

Hey @oasysdigital

From what I understand is that when you attempted to load your WordPress site you’re getting a message stating “Error establishing a database connection” the cause is most often one of the following:

  • The database has crashed, often due to the server running out of memory
  • The database login credentials are incorrect in your WordPress configuration
  • The WordPress database tables have been damaged

Also, you can refer to the tutorial link below:

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

Regards,

Dikshith

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

Hi Thanks for reply Dikshit

I tried to run few commands but it shows error

like when I run the command

sudo netstat -plt

it says

sudo: netstat: command not found

am i doing right?

The error itself is simply telling you it cannot connect to the assuming local mysql server?

You want to ensure the DB server is actually running, you can usually do this via SSH and simply type in mysqladmin -u root -p status, if its running then you should get a prompt, otherwise it will error out telling you the DB server is not running.

If it is running then you will want to check you WP-config to see what DB server / port it’s looking at. Ensure the username and password are working as well.

Hello, @oasysdigital

I will recommend you to double check the database details from the wp-config.php file and also make sure that MySQL/MariaDB is running as well.

Also make sure to double check our existing tutorial on how to troubleshoot this error on your droplet.

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

Hope that this helps!
Regards,
Alex

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