MySQL

Last_SQL_Error: Error Table is marked as crashed and should be repaired

JJ
Jobin Joseph · Founder and CEO
·Published 30 September 2016·1 min read

Today we had an issue with our Master-Master replication. Master2 was throwing the below error and the replication was stopped

Last_SQL_Errno: 145
Last_SQL_Error: Error 'Table './exampledb/exampletable' is marked as crashed and should be repaired' on query. Default database: 'livewbmy_db'. Query: 'INSERT INTO `exampletable` (`challenge`, `response`, `hashkey`, `expiration`) VALUES ('XBUL', 'xbul', 'a9e0f4e3dxxxxxccccccc0c8f8f1', '2016-09-29 21:10:03')'

Since its a Master-Master replication, we need to be careful before repairing the table on Master2.

Solution

Please comment if found helpful.

Jobin Joseph
Jobin Joseph, Founder and CEO
5x AWS Certified, ISO 27001:2022 Lead Implementer, 17+ years building cloud infrastructure for regulated industries.
About Jobin →

Reading this because your AWS bill or uptime is a problem?

30 minutes, direct with the founder, no sales pitch: one specific recommendation for your AWS workload.

Book a free 30-minute review
30 min Free Consultation →