• Resolved Vera Schafer

    (@vschafer)


    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)
  • 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

    (@vschafer)

    I do have a backup of the database, but I don’t know how to restore it via WP.

    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

    (@vschafer)

    I really don’t know. WP just mentions “Database”.
    As for the plugins, it doesn’t let me access the admin interface either :>(

    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

    (@vschafer)

    I backed that up using my server’s backup tool. It’s a xml.tar file format which I saved to my computer.

    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

    (@vschafer)

    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.

    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

    (@vschafer)

    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

    (@vschafer)

    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?

    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

    (@vschafer)

    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?

    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

    (@vschafer)

    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)
  • The topic ‘Database Problem’ is closed to new replies.