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

---

# Error establishing a database connection

 *  Resolved [warend2](https://wordpress.org/support/users/warend2/)
 * (@warend2)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-702/)
 * Hi guys,
 * I need your help one of our client the chembondinc.com is having a problem there
   was an error when you tried to open their website the error says **“Error establishing
   a database connection”.**
 * I already checked the wp-config.php and the details is correct, I tried to create
   the test.php file using the credentials on wp-config it does successfully read
   the database without errors.
 * On the wp-admin there was a message that says ” One or more database tables are
   unavailable. The database may need to be repaired. ” I tried to click the repair
   and install the additional script on wp-config.php file and click the repair 
   button, and these are the results:
 * The wp_users table is okay.
 * The wp_usermeta table is okay.
 * The wp_posts table is okay.
 * The wp_comments table is okay.
 * The wp_links table is okay.
 * The wp_options table is not okay. It is reporting the following error: Table ‘
   chembond_wp435.wp_options’ doesn’t exist. WordPress will attempt to repair this
   table…
    Failed to repair the wp_options table. Error: Table ‘chembond_wp435.wp_options’
   doesn’t exist
 * The wp_postmeta table is okay.
 * The wp_terms table is okay.
 * The wp_term_taxonomy table is okay.
 * The wp_term_relationships table is okay.
 * The wp_commentmeta table is okay.
 * Some database problems could not be repaired. Please copy-and-paste the following
   list of errors to the WordPress support forums to get additional assistance.
 * wp_options: Table ‘chembond_wp435.wp_options’ doesn’t exist
 * I tried to check on the phpmyadmin on cpanbel and click the wp_option table it
   appear an error message:
 * #1146 – Table ‘chembond_wp435.wp_options’ doesn’t exist
 * What seems the problem here guys? I did not touch the website, I guess the wordpress
   here is automatically updated the new version and it does not successfully updated.
   That is why it is having an error now.
 * I really appreciate your help
 * Thank you

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

 *  [HostPuma](https://wordpress.org/support/users/hostpuma/)
 * (@hostpuma)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-702/#post-6416040)
 * Backup the website first!
 * Do you see wp_options table in phpmyadmin?
 * Do you have an old backup for the website?
 * You need to upload a clean wp_options table but of course you will have to re-
   enter wp-options details from the admin area. If you have an old back, get the
   wp-options table from it and upload it through phpmyadmin.
 * The cause might be an auto update for WordPress/Plugins, or it might be the server
   administrator updated MySQL and something went wrong.
 *  Thread Starter [warend2](https://wordpress.org/support/users/warend2/)
 * (@warend2)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-702/#post-6416041)
 * > Do you see wp_options table in phpmyadmin?
 * Yes I see the table wp_options on phpmyadmin, but when I clicked it the error
   displays that it says wp_options are not exist…
 * > Do you have an old backup for the website?
 * No, I did not have any backup file but the server has a backup and they suggested
   to restore their backup. 🙂 Hopefully this could resolve this problem.
 *  [HostPuma](https://wordpress.org/support/users/hostpuma/)
 * (@hostpuma)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-702/#post-6416049)
 * Good but keep in mind that if this happened because of WordPress updating, then
   it might happen again.
 * Good luck with your business.
 *  Thread Starter [warend2](https://wordpress.org/support/users/warend2/)
 * (@warend2)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-702/#post-6416260)
 * The server have restored the backup database. Thank you HostPuma

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

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

## Tags

 * [database connection](https://wordpress.org/support/topic-tag/database-connection/)
 * [Database Error](https://wordpress.org/support/topic-tag/database-error/)
 * [wp-config.php](https://wordpress.org/support/topic-tag/wp-config-php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [warend2](https://wordpress.org/support/users/warend2/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-702/#post-6416260)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
