WordPress Installation Error - “Error Establishing a Database Connection”
This error is usually fixed by double checking what the three questions ask on the WordPress installation error page.
WordPress Install Error
This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.
- Are you sure you have the correct username and password?
- Are you sure that you have typed the correct hostname?
- Are you sure that the database server is running?
If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.
Still not working?
It seems that this error can be caused with some versions of MySQL. If you can access the database, go to phpmyadmin > click the database name > click SQL and try running this query.
SET PASSWORD FOR some_user@some_host = OLD_PASSWORD('your_old password_here');
Just copy and past that line of code and replace the variables with the information entered in your wp-config.php file.
some_user = MySQL username
some_host = “localhost” most of the time
your_old password_here = MySQL password
Now try loading WordPress again and see if it will establish a connection with the database.