14. Database Maintenance, Backups, and Replication

Ideally, MySQL runs smoothly from the time you first install it. But problems can occur for reasons ranging from power outages to hardware failure to improper shutdown of the MySQL server (such as when the server host crashes or you forcibly terminate it with kill -9). Events such as these, many of which are beyond your control, can result in database damage, typically caused by incomplete writes in the middle of table updates.

This chapter describes what you can do to minimize your risks and to be ready if disaster strikes anyway. The techniques covered here include making database backups, performing table checking and repair operations, and how to recover if you do lose data. The chapter also ...

Get MySQL, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.