Fixing MoveableType

Sometime Sunday, Laura‘s MoveableType barfed. Any MT action, such as posting or editing posts, yielded the following error message:

Statement has no result columns to bind (perhaps you need to successfully call execute first) at /usr/hosted/abracapocus.org/cgi-bin/mt/lib/MT/ObjectDriver/DBI/mysql.pm line 224.

After some investigation, it appeared that the problem was with the actual MySQL database, rather than the MT backend.

The solution was to use the myisamchk utility, from the command line, to repair the tables:

cd to the directory where the database lives.
myisamchk -q -r *.MYI

This repaired the corrupted database. However, it also seems to have deleted all of the comments on the site. This is why you should always make a good backup.