User warning: Incorrect key file for table I am getting the following error and I don't know why this is happening.


  User warning: Incorrect key file for table
  &#039;./edubridge/watchdog.MYI&#039;; try to repair it query: INSERT
  INTO watchdog (uid, type, message, variables, severity, link,
  location, referer, hostname, timestamp) VALUES (6,
  &#039;imagecache&#039;, &#039;404: Unable to find %image &#039;,
  &#039;a:1:{s:6:\&quot;%image\&quot;;s:64:\&quot;sites/all/files/pictures/cactus_flowers_beauty_Funzug.org_12.jpg\&quot;;}&#039;,
  3, &#039;&#039;,
  &#039;http://edubridge/sites/all/files/imagecache/members_87/pictures/cactus_flowers_beauty_Funzug.org_12.jpg&#039;,
  &#039;http://edubridge/assignment/list/8223/556&#039;,
  &#039;192.168.99.171&#039;, 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.