It’s might take the time to repair the table that depends upon a size of tables. It takes few seconds to repair few KB table, and Its takes few minutes to repair for a few MB table and can take hours if the table is in a few GB. To restore huge table better option is to restore it from backup but if you don’t have the backup we can restore it but you need to face long repair process.

Here is the Syntax REPAIR TABLE

1

2

3

REPAIR TABLE table_name[,table_name...]

REPAIR TABLE works only on Storage Engine such as MyISAM and for each repaired table you can get many rows of information after optimizing database tables.The InnoDB table can not be recovered as it does not support the recovery.

NOTES: It is better to take the backup of the table before you repair the table because if the repair fails, can lead to data loss.

Let’s move to repairing a table.

To repair a table you can directly apply a query like:

1

2

3

repair table my_crashed_table;

And if you don’t want to do it with query, you can do it from PHPMyAdmin by following steps

Post navigation

About Author

Bhumi

Bhumi shah is currently working with leading web development company as a Software Analyst and also the founder of the Creativedev. She has immense interest in programming and web designing.She is passionate about technical blogging and almost versatile in terms of programming across various languages & frameworks such as PHP,MySQL WordPress, Twitter Bootstrap, AngularJS, HTML5, CSS3, jQuery and more.