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.
Click below to sign up and get $100 of credit to try our products over 60 days!
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
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.
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?
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:
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
Its “Error Establishing Database Connection”