mysqlwordpress

WP Database repair


I couldn't access my wp-admin (the front end is working so far).

WP System told me to add the WP_ALLOW_REPAIR to true in wp-config.php.

I did.

I pressed the repair database and got the following messages:

wp_users: 1 client is using or hasn't closed the table properly
wp_usermeta: 9 clients are using or haven't closed the table properly
wp_posts: 21 clients are using or haven't closed the table properly
wp_comments: 33 clients are using or haven't closed the table properly
wp_options: Table is marked as crashed
wp_postmeta: 28 clients are using or haven't closed the table properly
wp_terms: 3 clients are using or haven't closed the table properly
wp_term_taxonomy: 18 clients are using or haven't closed the table properly
wp_term_relationships: 18 clients are using or haven't closed the table properly
wp_commentmeta: 26 clients are using or haven't closed the table properly

Is this a solvable problem, or should I... just... find some hills to run to :/

Main, business site. Worried. What gives? Please help.


Solution

  • The output you posted indicates a problem with the wp_options table. Normally this is recoverable by issuing a repair command (Make a backup of the all data before doing any operations). To issue the command you can use phpMyAdmin or whatever client you prefer:

    REPAIR TABLE wp_options
    

    More info about this command: MySQL Reference Manual: REPAIR TABLE Syntax

    If this doesn't help, try issuing the command with the following arguments:

    REPAIR TABLE wp_options EXTENDED
    

    or

    REPAIR TABLE wp_options USE_FRM
    

    Read the info about USE_FRM in the MySQL manual.