Title: Cannot resolve Database Connection Error
Last modified: August 20, 2016

---

# Cannot resolve Database Connection Error

 *  [danpezmusic](https://wordpress.org/support/users/danpezmusic/)
 * (@danpezmusic)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/cannot-resolve-database-connection-error/)
 * Hi guys, I have been continually getting this error ‘Error establishing a database
   connection’. I’m sure most people would have come across this problem at some
   point but I am still having problems even after adding a new user and password
   so that the DB_USER & DB_PASSWORD are definately correct in the wp-config file.
   DB_NAME is fine and I am hosting with bluehost, so the database host should be
   localhost (in wp-config.php), shouldn’t it? I am still getting this error but
   if I refresh a few times I still can view my website, sign in to wordpress dashboard
   and change my blog etc. If there is an error connecting to my database why can
   I still connect to my database? I have looked at so many help docs at this point
   and tryed a couple of other things that were suggested but still no luck. Any
   suggestions??

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

 *  [BlogDesignTeam](https://wordpress.org/support/users/blogdesignteam/)
 * (@blogdesignteam)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/cannot-resolve-database-connection-error/#post-2108896)
 * From what you described I think it’s mostly server downtime (so not really your
   fault). But it’s bluehost and they seem to be reputable? To be sure send a message
   to the bluehost team. Happened to me before when my hsot kept switching servers.
   Really a hastle with lots of downtimes.
 *  [bh_WP_fan](https://wordpress.org/support/users/bh_wp_fan/)
 * (@bh_wp_fan)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/cannot-resolve-database-connection-error/#post-2109000)
 * The ‘Error establishing a database connection’ error is not always because of
   a failure to actually establish a connection. Running an strace against my own
   scripts on times like these, I have found before that the connection is actually
   made, and then, in my case, a plugin of mine was causing the problem afterwards.
 * When you’re having problems, like was suggested, it would be good to contact 
   your host and see if they can find server problems or advise further.
 * You would also want to start removing (and deleting) any plugins you don’t really
   need, and making sure the others are fully updated. If you have a lot of them,
   test deactivating a few a day and see if performance increases on that day.
 * Also search through these forums for optimization tips as it could be some poor
   performance problems which are helping contribute to the ‘Error establishing 
   a database connection’ error.

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

The topic ‘Cannot resolve Database Connection Error’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [bh_WP_fan](https://wordpress.org/support/users/bh_wp_fan/)
 * Last activity: [14 years, 10 months ago](https://wordpress.org/support/topic/cannot-resolve-database-connection-error/#post-2109000)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
