Quantcast
Channel: Topic Tag: Database Error | WordPress.org
Viewing all articles
Browse latest Browse all 642

LordLiverpool on "Error establishing connection to database"

$
0
0

Hello WordPress World

When I tried navigating to my website I got the dreaded:

Error establishing connection to database

When I tried navigating to my admin login http://www.website/wp-admin I got

One or more database tables are unavailable. The database may need to be repaired.

So I google the problem and decided to follow the instructions in this great article:

http://www.wpbeginner.com/wp-tutorials/how-to-fix-the-error-establishing-a-database-connection-in-wordpress/

As instructed I added the following line of code to wp-config.php

define('WP_ALLOW_REPAIR', true);

My website is back up and running however the output of repair.php was

Some database problems could not be repaired. Please copy-and-paste the following list of errors to the WordPress support forums to get additional assistance.

wp_posts: 1 client is using or hasn't closed the table properly
wp_options: Table is marked as crashed

This is the 2nd time in the last 2 weeks I've had to repair my database this way.

2 questions:

1. What is the underlying cause?

2. How do I resolve the exceptions reported above that repair.php was unable to fix?

Cheers


Viewing all articles
Browse latest Browse all 642

Trending Articles