Title: Database Problem
Last modified: August 19, 2016

---

# Database Problem

 *  Resolved [Vera Schafer](https://wordpress.org/support/users/vschafer/)
 * (@vschafer)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/database-problem-14/)
 * I got the error:
    “One or more database tables are unavailable. The database 
   may need to be repaired”
 * I tried to fix the problem by adding this line to the wp-config.php:
    define(‘
   WP_ALLOW_REPAIR’, true);
 * Then I got the Repair Database screen, but when I click on it, I get a “Are you
   sure you want to do this? Please try again.”. But every time I click on the “
   Please try again” button, it shows the “Repair Database” screen again.
 * What am I doing wrong?

Viewing 8 replies - 16 through 23 (of 23 total)

[←](https://wordpress.org/support/topic/database-problem-14/?output_format=md) [1](https://wordpress.org/support/topic/database-problem-14/?output_format=md)
2

 *  Thread Starter [Vera Schafer](https://wordpress.org/support/users/vschafer/)
 * (@vschafer)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/page/2/#post-1347018)
 * But since I still have the other file, generated by WP plugin *.sql.gz that was
   received before I upgraded WP, I still can try to restore this one, right?
 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/page/2/#post-1347025)
 * > Well, he blamed me for not making a backup before I updated WP.
 * Well, you should have made a backup. I hope he was nice about it at least.
 * I didn’t realize that this began with an upgrade, though. That would have been
   helpful in the beginning. This did happen _immediately_ after an upgrade, right?
 * Now, to be clear: You currently have no WP database online for this blog. I ask
   because restoring from the gzip-ed file will destroy anything left on the existing
   database or at least make a big mess if it doesn’t. Ok, maybe a wee bit melodramatic,
   but this not something to do lightly. Also, I don’t know what is in that .gz 
   file. Hopefully it pulled down everything.
 *  Thread Starter [Vera Schafer](https://wordpress.org/support/users/vschafer/)
 * (@vschafer)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/page/2/#post-1347026)
 * Well, let me clarify something: we are talking about 2 backups:
 * 1) The one I found on Plesk = that one my server says he tried to restore too
   but it is empty.
 * 2) The one I got automatically from WordPress before the update. This one I haven’t
   tried to restore yet, cause I don’t know if I can do it using WP MyPhPAdmin or
   if I have to upload it to Plesk then restore.
 *  Thread Starter [Vera Schafer](https://wordpress.org/support/users/vschafer/)
 * (@vschafer)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/page/2/#post-1347027)
 * Correct. Now I only have the template as WP was re-installed. So, this backup
   would not destroy anything.
 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/page/2/#post-1347028)
 * Ok. You need to un-gzip the backup. I don’t remember if Windows will do it natively
   or if you need to download something like Alzip. Once you have it un-gzipped 
   and you have a .sql file you need to [do this](http://codex.wordpress.org/Restoring_Your_Database_From_Backup).
   If you have a good backup it should work out OK. This process won’t destroy the
   backup .sql file, so you can do it over if you need to.
 *  Thread Starter [Vera Schafer](https://wordpress.org/support/users/vschafer/)
 * (@vschafer)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/page/2/#post-1347029)
 * I’m on a Mac, but I’ll look for it. Pls keep your fingers crossed for me :>(
 *  Thread Starter [Vera Schafer](https://wordpress.org/support/users/vschafer/)
 * (@vschafer)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/page/2/#post-1347030)
 * It worked like a charm! I can’t thank you enough for your time and patience! 
   It is not recognizing my Admin password anymore but I guess I can try to get 
   it via email. Just wanted to thank you, thank you! thank you! You are my hero!
 *  Thread Starter [Vera Schafer](https://wordpress.org/support/users/vschafer/)
 * (@vschafer)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/page/2/#post-1347031)
 * Just an update to let you know that I managed to recover admin password as well,
   by following instructions on Codex to upload an emergency.php file to the server
   and deleting the file afterwards. Thank you again for all your help. I learned
   a lot these past days! Closing this topic now for good :>)

Viewing 8 replies - 16 through 23 (of 23 total)

[←](https://wordpress.org/support/topic/database-problem-14/?output_format=md) [1](https://wordpress.org/support/topic/database-problem-14/?output_format=md)
2

The topic ‘Database Problem’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 23 replies
 * 3 participants
 * Last reply from: [Vera Schafer](https://wordpress.org/support/users/vschafer/)
 * Last activity: [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/page/2/#post-1347031)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
