[resolved] Unable to access my blog (4 posts)

  1. scgms1
    Posted 3 years ago #

    I'm unable to access my blog after deleting a spam post on it. I'm not sure what had happened, but the exact message was, "One or more database tables are unavailable. The database may need to be repaired."

    I added "define('WP_ALLOW_REPAIR', true);" to the wp-config.php file and I ended up with a "Error establishing a database connection"

    Here's what's in the wp-config.php file.

    define('WP_ALLOW_REPAIR', true);
    // ** MySQL settings ** //
    define('WP_CACHE', true); //Added by WP-Cache Manager
    define('DB_NAME', '[ redacted ]');     // The name of the database
    define('DB_USER', '[ redacted ]');     // Your MySQL username
    define('DB_PASSWORD', '[ redacted ]'); // ...and password
    define('DB_HOST', 'mysql');     // 99% chance you won't need to change this value
    // Change the prefix if you want to have multiple blogs in a single database.
    $table_prefix  = 'wp_';   // example: 'wp_' or 'b2' or 'mylogin_'
    // Change this to localize WordPress.  A corresponding MO file for the
    // chosen language must be installed to wp-includes/languages.
    // For example, install de.mo to wp-includes/languages and set WPLANG to 'de'
    // to enable German language support.
    define ('WPLANG', '');
    /* Stop editing */
    define('ABSPATH', dirname(__FILE__).'/');

    What do I need to do at this point?

  2. First make a backup copy of that wp-config.php file for safe keeping.

    Once that backup is made delete that one line at the top that you've added and re-add it after the <?php line. Where you put that line would cause a problem.

    Also consider performing a database repair via phpmyadmin.


    Once your WordPress installation is working again, you may want to speak to your host provider about changing the mysql user ID and password. For 19 minutes or so that info was on your post above and you should never post details like that.

  3. scgms1
    Posted 3 years ago #

    Hi Jan,

    Thanks for the tips! I'm sure this stuff is simple for you, but it is new to me. Switching the "define('WP_ALLOW_REPAIR', true);" and putting it after the <?php tag didn't work.

    Installing phpmyadmin did the trick after the program repaired the database.

    I also was able to change the password with phpmyadmin.

    Thanks for your help!

  4. Glad to help. :)

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.