Chapter 13. Database Maintenance and Repair

Ideally, MySQL runs smoothly from the time that you first install it. But problems sometimes do occur for a variety of reasons, ranging from power outages to hardware failure to improper shutdown of the MySQL server (such as when you terminate it with kill –9 or the machine crashes). Circumstances such as these, many of which are beyond your control, can result in damage to database tables, typically caused by incomplete writes in the middle of a change to a table.

This chapter focuses on detecting and solving problems with your tables, regardless of how those problems arise. For table checking and repair, the MySQL administrator's best friends are the myisamchk and isamchk utilities. These two programs ...

Get MySQL now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.