Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Harddrive bit-rot does happen. Does MySQL go about making sure that bit-rot does not happen to my data stored in the database? Ie. does it make any row-level checksumming, or table-level checksumming? I guess it's not dealing with error correcting codes.

Let's stick to InnoDB and MyISAM for this answer (as they are the most common DB engines).

share|improve this question
I didn't check. but i would guess both of them are much too optimized for performance to do any checksumming. – mauro.stettler Feb 22 '13 at 9:30
Your storage media does checksuming - so if you lost/flipped bits, MySQL is never going to see the data to test any checksum it adds. – symcbean Feb 22 '13 at 9:40
syncbean, so would you say bit-rotting is a non-issue at the application layer? – Ztyx Feb 22 '13 at 9:49
It entirely depends on your media. A single sata/ide hard drive doesn't do checksums, so a flipped bit wouldn't be detected. A raid-1 array would detect it, and a three disk raid-1 would be able to repair it. SSDs tend to do checksums to detect when pages start failing due to wear. – kormoc Feb 25 '13 at 7:43
up vote 4 down vote accepted

Innodb checksums each data page and by default verifies that checksum each time the page is read from disk:

I'm not sure that myisam has internal checksumming, but there are a bunch of external utilities that can verify the integrity of myisam tables/data (myisamchk, etc).

Between the two, I think Innodb is a much better choice for data integrity if that is what you're looking for.

Hope that helps.

share|improve this answer
You also can use the innochecksum tool to verify any binary backups you make as well. Url: – kormoc Feb 25 '13 at 7:40
This could also be useful:… – Ztyx Apr 10 '13 at 10:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.