-
Notifications
You must be signed in to change notification settings - Fork 36
trouble db failure recovery
In the event that a database shuts down prematurely or unexpectedly, tables may become corrupt or out of sync. In such an event it is possible that Melody may remain functional until the application attempts to access one of those corrupt tables at which time you may encounter an application error like the following.
Statement has no result columns to bind (perhaps you need to successfully call execute first) at .../cgi-bin/mt/extlib/Data/ObjectDriver/Driver/DBI.pm <.../cgi-bin/mt/extlib/Data/ObjectDriver/Driver/DBI.pm> line 119.
In most cases this error is easily recovered from by running an integrity check on
the database. If you are running MySQL you can do this by running the
mysqlcheck
command. We recommend first scanning the database for errors
before repairing them. First execute:
mysqlcheck -u <user> -p <movabletype_db>
If errors are found, you may see output like this:
movabletype.mt_asset OK
movabletype.mt_association OK
movabletype.mt_author
warning : 1 client is using or hasn't closed the table properly
status : OK
movabletype.mt_blog
warning : 1 client is using or hasn't closed the table properly
status : OK
movabletype.mt_category OK
movabletype.mt_comment
warning : 2 clients are using or haven't closed the table properly
status : OK
movabletype.mt_config OK
movabletype.mt_entry
warning : 3 clients are using or haven't closed the table properly
status : OK
movabletype.mt_ext_bl_group OK
movabletype.mt_ext_bl_groupmap OK
movabletype.mt_ext_bl_item OK
movabletype.mt_ext_bl_log OK
movabletype.mt_ext_bl_permission OK
movabletype.mt_ext_bl_source OK
movabletype.mt_ext_bl_update OK
movabletype.mt_fileinfo
warning : Table is marked as crashed
warning : 1 client is using or hasn't closed the table properly
error : Size of datafile is: 4722688 Should be: 4722692
error : Corrupt
movabletype.mt_ipbanlist OK
movabletype.mt_log OK
movabletype.mt_notification OK
movabletype.mt_notifier_data OK
movabletype.mt_notifier_queue OK
<snip>
If it appears your database may have corrupt tables, repair your database using the proper command. In MySQL, you would run:
prompt> mysqlcheck -r -u <user> -p <movabletype_db>
This command should then indicate if it was able to repair your corrupted tables. For example:
info : Found link that points at 4722672 (outside data file) at 1870256
status : OK
Once that is complete, try accessing Melody again to see if your problem is resolved.
Questions, comments, can't find something? Let us know at our community outpost on Get Satisfaction.
- Author: Six Apart Ltd., Byrne Reese
- Edited by: Violet Bliss Dietz