Title: Error Establishing Database Connection
Last modified: April 26, 2018

---

# Error Establishing Database Connection

 *  [yukon4](https://wordpress.org/support/users/yukon4/)
 * (@yukon4)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-117/)
 * This site has been under attack by bots or something and a lot of garbage email
   was being sent out. We think we got that squared away.
 * Now – – – the site sporadically does not display and instead we get the “Error
   Establishing Database Connection” message. Could this have anything to do with
   the above earlier situation?
 * Our host cannot seem to fix the problem for us (most other hosts I’ve worked 
   with CAN fix it). Instead, they instructed us to “delete our website, delete 
   WordPress, reinstall a new copy of WordPress to re-establish the database connection,
   and then re-upload the website”
 * Delete our website??
 * That makes absolutely no sense to me. This can’t be right.
 * Any suggestions? We cannot even log into the Dashboard and our host (1and1) doesn’t
   seem very knowledgeable.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-establishing-database-connection-117%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [pramadiputra](https://wordpress.org/support/users/pramadiputra/)
 * (@pramadiputra)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-117/#post-10220948)
 * “Error establishing a Database Connection” typically can be caused by
    – A Typo
   or Incorrect Database Credential given in wp-config.php (Such as DB_HOST, DB_USER,
   DB_PASSWORD) – Database Server is not running
 * And before I continue, I just checked your website and it’s working fine. Are
   you still seeing the same issue through your device?
 *  Thread Starter [yukon4](https://wordpress.org/support/users/yukon4/)
 * (@yukon4)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-117/#post-10223267)
 * Yes, willy-nilly we managed to get it back again.
 * Don’t you find it concerning though that a web hosting company would advise clients
   that the solution to this error message is to delete their site, delete their
   WP install and start over with a fresh installation of WP?
 * Thank you very much for your input!

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

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

## Tags

 * [database connection error](https://wordpress.org/support/topic-tag/database-connection-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [yukon4](https://wordpress.org/support/users/yukon4/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-117/#post-10223267)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
