Crashed Table on 5.6

Permalink
One of my client's sites had this error show up on the TLD and all pages:

An Unexpected Error has Occured
mysqlt error: [144: Table './charism2_triumph/Blocks' is marked as crashed and last (automatic?) repair failed] in EXECUTE("select Blocks.bID, CollectionVersionBlocks.arHandle from CollectionVersionBlocks inner join Blocks on (CollectionVersionBlocks.bID = Blocks.bID) inner join BlockTypes on (Blocks.btID = BlockTypes.btID) where CollectionVersionBlocks.cID = '1' and (CollectionVersionBlocks.cvID = '134' or CollectionVersionBlocks.cbIncludeAll=1) order by CollectionVersionBlocks.cbDisplayOrder asc")


I am hoping to get this fixed today. Any pointers as to what the issue is and how to fix it will be greatly appreciated. I am also willing to compensate if needed.

FYI, i did try to repair using phpMyAdmin... No avail. shows that repair failed...

Please note: This site is running C5.6

CharismaBusiness
 
CharismaBusiness replied on at Permalink Reply
CharismaBusiness
bump
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
The repair command you tried was the best first step. The repair command works on a running database. There are also some mysql command line tools for checking database table integrity and repairing that go beyond what repair is capable of, but they need the database server to he stopped.

Next would be to try removing and restoring just that table from a backup. That will only work if you have not made any changes (edits to blocks) since the last backup, or you will have to get in and edit data manually to prevent concrete5 breaking on skewed data. My usual approach for broken databases is to try and copy what is there and do the repairs on a cloned site. Get it all working smoothly, then swap it for the broken live site.

Last option is to recover the entire site from a backup.

You should also start thinking about how the table became that badly damaged, investigate for any problems with the host environment or hardware.
CharismaBusiness replied on at Permalink Reply
CharismaBusiness
After being down for 4 days, I wake up this morning to see that it somehow fixed itself. I made a full backup of the files and database right away. I will have to do research into why it happened. Thanks so much for your reply JohntheFish. Very helpful as usual. :)