WARNING: mismatch_cnt is not 0

I got an email regarding this issue saying something like :

 

WARNING: mismatch_cnt is not 0 on /dev/md1

The /dev/mdX can vary depending on how many raid partitions you have. This mismatch_cnt value is the value of the blocks,

that are not synchronized between RAID-1 (mirrored) drives.  On my server it looked something like :

To fix :

And after the repair is completed:

Then check to see what this returns:

Repair a Mysql database

When we try to repair a MySQL database we can stop the service. If you are using the MyISAM engine I recommend using myisamchk. A basic repair sentence could be like this:

myisamchk -r -q -p -v –sort_buffer_size=2000M /var/lib/mysql/database/table.MYI

The used parameters are the following:

* -r recovery mode
* -q quick recovery, the most common one. If this mode does not work you will have to make some research on your own.
* -p creates the keys to be repared in parallel threads.
* -v verbose mode
* –sort_buffer_size= use this to indicate the size of the buffer to sort the keys. If you do not specify this value, or the value you specify is too small, then you will see something like this myisamchk: error: myisam_sort_buffer_size is too small. To solve this just increment the size of the buffer to be used, if the error always appear then you have a extremely big table.