Techn4b’s Blog

November 30, 2009

MySQL 5 – check and repair database

Filed under: Linux, SQL — Tags: , , , , — techn4b @ 10:55

Shell> mysqlcheck –all-databases -p –auto-repair

Default user root, with given password.

More Information: http://dev.mysql.com/doc/refman/5.0/en/mysqlcheck.html

Example Output:

mytable
warning  : Table is marked as crashed
error    : Size of datafile is: 593178624         Should be: 593179500
error    : Corrupt

Repairing tables
mytable
info     : Found block that points outside data file at 593176692
status   : OK
Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: