If you manually installed WordPress into your hosting account (e.g. did not install it via Fantastico in your Cpanel) and are getting an "Error establishing a database connection" message when trying to connect to WordPress, you need to modify your wp-config.php file in order to work with our Database servers.
Update your wp-config.php file
Open wp-config.php with a text editor such as Notepad. The wp-config.php file is located in your WordPress installation folder in your hosting account. If there is no file called wp-config.php, open wp-config-sample.php and save it as wp-config.php. You will be working in this file from now on.
Enter the Database information from your Database as follows:
1) putyourdbnamehere is your MySQL Database Name
2) usernamehere is your MySQL User Name
3) yourpasswordhere is your MySQL password
4) localhost is your MySQL Host Name
Update your wp-config.php file
Open wp-config.php with a text editor such as Notepad. The wp-config.php file is located in your WordPress installation folder in your hosting account. If there is no file called wp-config.php, open wp-config-sample.php and save it as wp-config.php. You will be working in this file from now on.
Code:
In wp-config.php, locate the section that looks like this example: /** The name of the database for WordPress */ define('DB_NAME', '[B]putyourdbnamehere[/B]'); /** MySQL database [B]username[/B] */ define('DB_USER', '[B]usernamehere[/B]'); /** MySQL database [B]password[/B] */ define('DB_PASSWORD', '[B]yourpasswordhere[/B]'); /** MySQL hostname */ define('DB_HOST', '[B]localhost[/B]');
1) putyourdbnamehere is your MySQL Database Name
2) usernamehere is your MySQL User Name
3) yourpasswordhere is your MySQL password
4) localhost is your MySQL Host Name