After a few days away from the site, it was working fine last time I checked, I try to log in as admin and get this

PDOException: SQLSTATE[HY000]: General error: 145 Table './playcbg_drupal/watchdog' is marked as crashed and should be repaired: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => user [:db_insert_placeholder_2] => Session opened for %name. [:db_insert_placeholder_3] => a:1:{s:5:"%name";s:5:"admin";} [:db_insert_placeholder_4] => 5 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => [:db_insert_placeholder_9] => 1366576685 ) in dblog_watchdog() (line 154 of /home/playcbg/public_html/drupal/modules/dblog/dblog.module).

I have a test user account on another browser that has remained logged in and it appears to work OK.

The site is relatively new and I don't have a backup of the database.

I have access to phpmyadmin but am not confident enough with SQL to attempt a DB repair without some expert guidance.


VM’s picture

with phpmyadmin

backup the database
empty the watchdog table or use the repair table command in the select list


a great place for frogs’s picture

Thanks VM, that was painless.

Abhimanyu Bose’s picture

The solution works great. I am a not an expert. I truncated the watchdog table and the issue was solved.

Thanks again.