Title: Error establishing a database connection
Last modified: August 19, 2016

---

# Error establishing a database connection

 *  [David McGavin](https://wordpress.org/support/users/david-mcgavin/)
 * (@david-mcgavin)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-264/)
 * WordPress has been up and running for months (v2.9.1 prefix ‘spn_’)on [http://www.spanishpropertynews.com/](http://www.spanishpropertynews.com/).
 * Last night I ran another WordPress installation (v3.0.4) for a different domain
   using the same database (prefix ‘wp_demo_’) since then the above domain no longer
   works.
    Error Message: **Error establishing a database connection**
 * I have checked the usual (several times) i.e. db_name, db_user, db_host, db_password
   and all is as it should be. The second domain is using the same database config
   data and it work fine.
 * Please help…. after several hours of checking and re-checking, changing and saving
   values – still no joy!
 * Thanks in advance
    David

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [govpatel](https://wordpress.org/support/users/govpatel/)
 * (@govpatel)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-264/#post-1894516)
 * did you make the change in wp-config.php of each install to corresponding prefix
 *  [kirota](https://wordpress.org/support/users/kirota/)
 * (@kirota)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-264/#post-1894533)
 * Hi!
 * I have the same problem..
    I am trying to install it for the first time, so maybe
   I did some kind of mistake? This is the message I get, but it also could be that
   there is something with server because I couldn’t reach File manager for almost
   24 hours.. Maybe I should wate a bit more? Thank you!!
 * > 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 sql313.webfreehosting.
   > net. 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.
 *  [govpatel](https://wordpress.org/support/users/govpatel/)
 * (@govpatel)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-264/#post-1894538)
 * may be there is problem with database in mean while recheck your wp-config.php
   database connection settings.
 *  [kirota](https://wordpress.org/support/users/kirota/)
 * (@kirota)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-264/#post-1894541)
 * I checked the wp-config.php few times. It could be that I don’t see the mistake(
   which can happen when you try to find it) or it is just the server problem..
   
   Do I have to do anything else but to change these settings?
 *  [mackehansson](https://wordpress.org/support/users/mackehansson/)
 * (@mackehansson)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-264/#post-1894546)
 * I get the same message after upgrading to 3.0.4?
 * Is this problem related to the new release?
 *  [kirota](https://wordpress.org/support/users/kirota/)
 * (@kirota)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-264/#post-1894554)
 * Could this be my problem?
 * > MySQL external access – Available on premium only – Upgrade
 *  Thread Starter [David McGavin](https://wordpress.org/support/users/david-mcgavin/)
 * (@david-mcgavin)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-264/#post-1894688)
 * Hi all,
    Thanks for your input.
 * I have re-checked the config file and the data for database name, user, password,
   host and table prefix are correct (as per MySQL Admin /CPanel).
 * There is nothing wrong with the database server because I’m using another installation(
   v3.0.4) is working fine. This installation is sharing the same database (i.e.
   name, user, password and host) the only difference is the table prefix.
 * I have tried everything (I think?) including changing the prefix to null (”) 
   saving the config file and then re-editing it and changing the prefix value back
   to ‘spn_’. But still no joy!
 * I’ve even gone as far as to rename the database table prefixes and then re-edit
   the config file. Guess what?, still no joy!!
 * Any other ideas?
 * Thanks in advance for your contributions.
    David.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Error establishing a database connection’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 7 replies
 * 4 participants
 * Last reply from: [David McGavin](https://wordpress.org/support/users/david-mcgavin/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-264/#post-1894688)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
