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

---

# Error establishing a database connection

 *  [Peoney](https://wordpress.org/support/users/peoney/)
 * (@peoney)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-482/)
 * Hi I can’t open one of my site, it says Error establishing a database connection.
   I check the error log and it says from Feb 3 the mysql database have gone away.
   I checl mysql database only the comments file is left. Everything is gone. The
   is nothing to restore. Is there a way to restore it?
    wp_users: Table doesn’t
   exist wp_usermeta: Table doesn’t exist wp_posts: Table doesn’t exist wp_links:
   Table doesn’t exist wp_options: Table doesn’t exist wp_postmeta: Table doesn’t
   exist wp_terms: Table doesn’t exist wp_term_taxonomy: Table doesn’t exist wp_term_relationships:
   Table doesn’t exist wp_commentmeta: Table doesn’t exist
 * Thank you

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

 *  [wprock](https://wordpress.org/support/users/wprock/)
 * (@wprock)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-482/#post-3644078)
 * Have you any database backup? Then you can restore the database again and you
   will not loss any data.
 *  Thread Starter [Peoney](https://wordpress.org/support/users/peoney/)
 * (@peoney)
 * [13 years ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-482/#post-3644260)
 * Unfortunately there was no backup. But I don’t know why the database disappear,
   the whole database didn’t disappear what is left is the comment that’s it. My
   webhost doen’t know either.
 * So I deleted the remaining database and create a new one and connect it (db name,
   db user, db password and localhost) to the WP using the wp_config but it doesn’t
   work. Why wouldn’t it work?

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

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Peoney](https://wordpress.org/support/users/peoney/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-482/#post-3644260)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
