Database administrators use MySQL database tables to store their personal as well as professional data or records. Sometimes, MySQL database throws a below error message:
“ERROR 1194 (HY000): Table 'table_name' is marked as crashed and should be repaired”
where “table_name” is your table table name.
Why this Happen? The first point comes in our mind that why have we got this error message? There are several reasons for this like virus attack, automatic system shutdown, power failure, hardware failure and many more.
Where to Start? To repair MySQL database table corruption, you can follow given below methods.
Method 1: The first method that you can try is Export/Import. To do this follow the below steps:
Export the corrupted or damaged MySQL table.
Delete it.
Import the exported MySQL table.
Repair it throgh “REPAIR_TABLE” syntax
“REPAIR [NO_WRITE_TO_BINLOG | LOCAL] TABLE
tbl_name [, tbl_name] ...
[QUICK] [EXTENDED] [USE_FRM]”
Optimize it through “OPTIMIZE_TABLE” syntax.
“OPTIMIZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE
tbl_name [, tbl_name] ...”
Notification: Method 1 is available for those database administrators that have command line permission.
Method 2: Incase, if you don't have MySQL database command line permission then you can repair corrupt MySQL table through phpMyAdmin. It has repair table option.
Method 3: At last but not least, if above two methods fail to repair corrupt/damaged MySQL database table then you can try any third party MySQL database repair utility.
“ERROR 1194 (HY000): Table 'table_name' is marked as crashed and should be repaired”
where “table_name” is your table table name.
Why this Happen? The first point comes in our mind that why have we got this error message? There are several reasons for this like virus attack, automatic system shutdown, power failure, hardware failure and many more.
Where to Start? To repair MySQL database table corruption, you can follow given below methods.
Method 1: The first method that you can try is Export/Import. To do this follow the below steps:
Export the corrupted or damaged MySQL table.
Delete it.
Import the exported MySQL table.
Repair it throgh “REPAIR_TABLE” syntax
“REPAIR [NO_WRITE_TO_BINLOG | LOCAL] TABLE
tbl_name [, tbl_name] ...
[QUICK] [EXTENDED] [USE_FRM]”
Optimize it through “OPTIMIZE_TABLE” syntax.
“OPTIMIZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE
tbl_name [, tbl_name] ...”
Notification: Method 1 is available for those database administrators that have command line permission.
Method 2: Incase, if you don't have MySQL database command line permission then you can repair corrupt MySQL table through phpMyAdmin. It has repair table option.
Method 3: At last but not least, if above two methods fail to repair corrupt/damaged MySQL database table then you can try any third party MySQL database repair utility.
I was also getting same error. Thanks for the helpful post.
ReplyDelete