Drupal Table Watchdog is Marked as Crashed Error

I ran into a problem the other day where one of my Drupal sites would not open up properly. Drupal is installed atop a MySQL database, and as it turns out, the /var partition had filled up. After removing some of the old log files that I didn't need, I restarted MySQL and found it was running fine for my non-Drupal sites. But, I was still having Drupal problems and noticed the following error in the Admin screen:

user warning: Table './drupal_database/watchdog' is marked as crashed and should be repaired query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (1, 'content', 'story: added Overcoming Bias.', 0, 'view', 'http://drupal_site.com/node/add/story', 'http://drupal_site.com/node/add/story', '198.145.33.2', 1185466674) in /home/drupal_directory/includes/database.mysql.inc on line 172.

In order to repair the crashed watchdog table, you'll need to log into mysql and run the following query:

mysql> use drupal_database;
mysql> repair table watchdog;
+----------------------------+--------+----------+-----------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+----------------------------+--------+----------+-----------------------------------------------------+
| drupal_database.watchdog | repair | info | Found block that points outside data file at 278520 |
| drupal_database.watchdog | repair | status | OK |
+----------------------------+--------+----------+-----------------------------------------------------+
2 rows in set (0.33 sec)

| Tags:

Thanks a lot !!!!

I have repaired it with this post. Very usefull !!!

Igor

Thank you so much! :)

Thank you so much! :)

Thank you for this help. I

Thank you for this help. I had the same problem and could fix it easy with your help.
Micha

This one helped me, thanks!!

This one helped me, thanks!!

Thanks a lot for posting

Thanks a lot for posting this. I had same issue and I was able to fix it instantly.

Logging into MySQL

Hi Brian. Logging into the MySQL command prompt requires that you have shell access, meaning that you login to the Linux shell of your server via Terminal or Putty. Once you're logged in, you can type in "mysql -u username -p" to gain access to MySQL.

I haven't used PHPMyAdmin recently, but from what I remember there should be an area where you can type in queries. You can also try using the MySQL query browser, which is available at http://dev.mysql.com/downloads/gui-tools/5.0.html

Good luck!

You don't have to respond to

You don't have to respond to this if you don't want to or don't have the time, but I ran into the same problem with my website (hosted by vizaweb). How do you or where do you "login" to the mysql to run the command? (There's a mysql section under the Vizaweb Control panel, but I cant find a "command prompt" looking application to run the command in) As You Can Probably Tell, I'm new at this, lol. Thanks,

-Brian Staton

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options