How recover corrupt table in MYSQL

Steps to Recover a corrupt table in mysql

1)      Go to  /var/lib/mysql/DB_Name  (Assuming DB is stored in given path)

2)      Run below command to scan whole DB to check for errors.

myisamchk /var/lib/mysql/DB_NAME/*.MYI >> /tmp/myisamchk_log.txt (Report will be exported in .txt format)

Use can see babel_user is corrupted

3)      Now run myisamchk –r babel_user.MYI command recover the said table.

After completion you can see above result.



Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>