MySQL Database Repair

Repair Crashed MySQL Database Table

Repair Crashed MySQL Database Table !



Each MySQL database is group of organized tables which store information in tabular format i.e. in row and column format. User can easily add or delete table from the database and can update it also when the need is felt. But in some situations tables stored in the database becomes corrupt and damaged and the data becomes inaccessible. Some of the common reasons due to which corruption happens are improper system shutdown, virus invasion, insufficient disk space, use of external application, faulty memory etc. This corruption and damage of database tables can cause serious data loss situations and in these situations is the backup of the lost files are not available then severe data loss can be caused and to get rid of it MySQL Repair solution is the only way.

To understand this thing in a better way lets consider a scenario where when you tried to access the MyISAM table of MySQL database, you encounter with the below mentioned error message –

MySQL error: 145
Table './rootforu_forum/Accounts' is marked as crashed and should be repaired
Query: SELECT * FROM Accounts WHERE sid='73bc9dbecbab357dc2ca7a54fb410f09' AND ip='XX.XX.X.XXX' LIMIT 1

This error message clearly indicates that the corruption of MySQL database has occurred in the accounts table of MyISAM database due to which the account has become inaccessible and the corruption has occurred due to the insufficient memory space. To make the account and the data stored in it database accessible, repair and restoration of database is required and for that follow some below mentioned steps and commands –

  • "CHECK TABLE Accounts;" This command will help you to check the database corruption.
  • Once severity of the database corruption is understood run these commands to fix the issues –
    • % mysqlcheck –uuser –ppass Accounts fixtures; OR
    • % myisamchk fixtures Accounts.MYI.

Before executing the first command just make sure that server should be running and before executing second command the server must be down and the account table should be inactive.

But, if the above mentioned commands also failed to solve the corruption issue of MySQL database, then the only way to rectify the issue is by using any third party software like MySQL Repair software which is very efficient in repairing and recovering MySQL database tables by performing through scanning of the database. It is interactive and easy to use as well which makes it the best software for this purpose.