Error establishing a database connection
-
Hello,
I have uploaded the WP 4.1.1 files to my website (where I am running MySql 5.5).
I have uploaded a wp-admin/wp-config.php file that has the correct, database name, user name, password, and hostname.
But, when I run mywebsite.com/wp-admin/wp-config.php, I get the following error:
“Error establishing a database connection
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 ChangedForPrivacy. 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?”I double-checked everything in my wp-config.php file that is on my server and it is all correct.
So, I created the following PHP file to triple-check myself:
<?php $hostname = "ChangedForPrivacy"; $username = "ChangedForPrivacy"; $dbname = "ChangedForPrivacy"; $password = "ChangedForPrivacy"; mysql_connect($hostname, $username, $password) OR DIE ("Unable to connect to database! Please try again later."); echo "Connected"; ?>When I run this PHP file, it definitely tells me it connected.
I would greatly appreciate any help.
The topic ‘Error establishing a database connection’ is closed to new replies.