Title: Database Problem
Last modified: August 19, 2016

---

# Database Problem

 *  Resolved [Vera Schafer](https://wordpress.org/support/users/vschafer/)
 * (@vschafer)
 * [16 years, 4 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 15 replies - 1 through 15 (of 23 total)

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

 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/#post-1346816)
 * Maybe nothing. WordPress may not be able to repair the DB. Can you get to the
   database by some other means? Through your web host’s backend?
 *  Thread Starter [Vera Schafer](https://wordpress.org/support/users/vschafer/)
 * (@vschafer)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/#post-1346856)
 * I do have a backup of the database, but I don’t know how to restore it via WP.
 *  [workingroup](https://wordpress.org/support/users/workingroup/)
 * (@workingroup)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/#post-1346861)
 * Are you talking about your SQL database or the WP back up created via the tools
   menu?
 * If you host with a company which allows WP sites, their tech support should resolve
   this issue for you.
 * Also there are some good plugins which create backups and do restores, try searching
   for one in your plugin interface in admin
 *  Thread Starter [Vera Schafer](https://wordpress.org/support/users/vschafer/)
 * (@vschafer)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/#post-1346869)
 * I really don’t know. WP just mentions “Database”.
    As for the plugins, it doesn’t
   let me access the admin interface either :>(
 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/#post-1346899)
 * You only have one database. The question concerns how you got the backup. Did
   you use the built in WP control panel or did you access you database by some 
   other means and back it up?
 *  Thread Starter [Vera Schafer](https://wordpress.org/support/users/vschafer/)
 * (@vschafer)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/#post-1346904)
 * I backed that up using my server’s backup tool. It’s a xml.tar file format which
   I saved to my computer.
 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/#post-1346924)
 * What server backup tool did you use? You want to know for sure that you have 
   a complete, and not just a partial, backup.
 * What other tools does your host provide? Does PHPMyAdmin ring a bell?
 *  Thread Starter [Vera Schafer](https://wordpress.org/support/users/vschafer/)
 * (@vschafer)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/#post-1346932)
 * First let me thank you very much for your close follow-up. That was the first
   time I did a back-up and I just used the backup instructions offered by my server.
   I use Plesk to access the server. PHPMyAdmin doesn’t ring a bell in this case…
   Today I used the restore feature in the same Plesk interface, got a confirmation
   that it was restored successfully but it still doesn’t work.
 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/#post-1346937)
 * Ok. Login to Plesk. When I login to Plesk I end up on a page with a few buttons
   at the top and my domain listed at the bottom. Click the domain and find the 
   database button. It looks like two stacks of poker chips, at least on the version
   I’m using. Click the database button. You should get a listing of available servers,
   probably only on labeled something like ‘Local MySql Server’. Click the Server.
   Now, hopefully, you will see a button labeled ‘DB WebAdmin’. It looks like a 
   single stack of poker chips with a wrench next to it. Click the Button. Hopefully
   you’ll get a window with phpMyAdmin running in it. If you do, click on the database
   name and on the various tables and look around for errors. phpMyAdmin will tell
   you if you have damaged tables. Be careful though and **don’t click** anything
   that looks like a big red X. If you get any messages about ‘dropping’ or ‘truncating’
   anything, **do not** say OK. ‘Drop’ and ‘Truncate’ basically mean ‘Delete’ and
   it is permanent.
 * Once you get into phpMyAdmin. I’d recommend backing up everything before doing
   anything else. Click the database name and look across the row of tabs to ‘Export’.
   Click it. Select everything (the list of tables) under ‘Export’ with the SQL 
   radio box selected. Click ‘Save as File’. Click ‘Go’. Save the file. Open the
   file with a text editor like Notepad and make sure it has stuff in it. Close 
   the file. Now you have a second backup.
 *  Thread Starter [Vera Schafer](https://wordpress.org/support/users/vschafer/)
 * (@vschafer)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/#post-1346968)
 * I am waiting for an answer from the server because, apparently, my Plesk’s version
   is different as I don’t see the same buttons. Your detailed instructions are 
   easy to follow but when I get to a database button, I don’t see what you explained.
 *  Thread Starter [Vera Schafer](https://wordpress.org/support/users/vschafer/)
 * (@vschafer)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/#post-1347009)
 * I hope you are still following this thread. I wasn’t able to restore the backup
   from Plesk but I was able to rescue a file that was generated by wordpress backup
   plugin and sent automatically to me a few days before the site disappeared. The
   file is a *.sql.gz format. Do you think I could try to use Plesk to restore from
   this file or should I just upload it via FTP to the server? If so, to which directory
   I should upload it to?
 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/#post-1347011)
 * You can’t upload files into MySql via FTP and I’m not sure if PhpMyAdmin with
   accept .gz files. It might. .gz is a compression format, something like .zip.
   You need to decompress it then import using PhpMyAdmin. But I thought we were
   trying to repair the database, at this point, not restore it from a backup. What
   happened? Maybe you are on the right track, its just that I seem to have missed
   a step.
 *  Thread Starter [Vera Schafer](https://wordpress.org/support/users/vschafer/)
 * (@vschafer)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/#post-1347012)
 * I was trying to repair the database but the server said that file was empty
    (?!?).
   Is there a software I can download to my Mac in order to decompress this .gz 
   file?
 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/#post-1347015)
 * > I was trying to repair the database but the server said that file was empty
 * That sounds suspiciously like a server crash. Have you asked your host if they’ve
   had any issues?
 *  Thread Starter [Vera Schafer](https://wordpress.org/support/users/vschafer/)
 * (@vschafer)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/database-problem-14/#post-1347017)
 * Well, he blamed me for not making a backup before I updated WP. I do have a few
   other blogs with this server (a friend of my daughter) and they are all workings
   just fine. I’m afraid I’ll never know who to blame, if any.

Viewing 15 replies - 1 through 15 (of 23 total)

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

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
