I am getting the following error and I don't know why this is happening.

User warning: Incorrect key file for table './edubridge/watchdog.MYI'; try to repair it query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (6, 'imagecache', '404: Unable to find %image ', 'a:1:{s:6:\"%image\";s:64:\"sites/all/files/pictures/cactus_flowers_beauty_Funzug.org_12.jpg\";}', 3, '', 'http://edubridge/sites/all/files/imagecache/members_87/pictures/cactus_flowers_beauty_Funzug.org_12.jpg', 'http://edubridge/assignment/list/8223/556', '', 1317211007) in _db_query() (line 149 of /var/www/html/edubridge/includes/database.mysql.inc).

Does anyone know how to fix it?


Two quick things you can try.

First, make sure the disk on your server isn't full. MySQL can behave very weirdly when this happens.

Second, take a backup of your database (like with Backup and Migrate). Then, from mysql CLI, MySQL Query Browser, or something similar do

CHECK TABLE watchdog;

and see if there is anything weird. If so, you can do

REPAIR TABLE watchdog;

The MySQL docs will have more info on CHECK TABLE and REPAIR TABLE.

Sometimes, though, when a database gets wonky it is just best to restore a backup and move on.

Not the answer you're looking for? Browse other questions tagged or ask your own question.