Friday, February 24, 2012

MySQL Recovery to Fix Error 145 in Database

Every MyISAM table is stored in three kind of files, these are .frm, .myd, .myi, stand for table format, data, and indexes. These files may become corrupt due http://www.blogger.com/img/blank.gifto system failure, when MyISAM table not closed properly, that generate unnecessary circumstance of table corruption. In these condition there may arise error and then we can solve that by using recover MySQL Database.

Now, take an example where you are creating a MySQL database that saved at its default location MyISAM. But, All of sudden there occur a error message that is following.

“MySQL error code 145 = Table was marked as crashed and should be repaired.”

The error may arise when we tried to access data’s from corrupted tables. To fix this error you should use proper tools.

Mostly, this error can be easily solved using database repair utilities, but first of all we should check the integrity of the database. For that, you have to follow the following steps.

First check that server is running on which table is stored.
Run the following command for check table consistency:

myisamchk table_name

Where, table_name refers to the name of table to be checked

If the table is reported as corrupt, repair it using the below command:
http://www.blogger.com/img/blank.gif
myisamchk -r -q table_name

This is a quick recovery modet to repair only the indexes of table. If this doesn't work, execute the below command.

myisamchk -r table_name

This command will delete the affected rows that make the table useless. Though, it is necessary to create backup of your database to repair MySQL database. For safe MySQL database recovery, you need to additional utilities that can secure to your database to repair corrupted database.

Stellar Phoenix Database Recovery for MySQL is a tool that is used for repair MySQL database. This harmless tool can be used for both MyISAM and InnoDB database file repair.

No comments:

Post a Comment