How to , and other stuff about linux, photo, php … A linux, photography blog. To remember some linux situation, and fix them quickly.

March 31, 2008

How to restore/repair/recover a mySQL Database/Table

Filed under: Linux — admin @ 2:21 pm

From time to time mySQL databases can get corrupt, whether it due to lack of disk space, power failure, or just an error.

Repairing MyISAM mySQL Tables/Databases:

cd /var/lib/mysql/DBNAME
#^ Please note that we assume your mySQL data directory is /var/lib/mysql

myisamchk *.MYI

Repairing ISAM mySQL Tables/Databases:

cd /var/lib/mysql/DBNAME
#^ Please note that we assume your mySQL data directory is /var/lib/mysql

isamchk *.MYI

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress