Day 16. Repair and Maintenance

In yesterday's lesson on database administration, you saw how to back up and restore a database. Conducting a regular backup is a good strategy for avoiding disaster, and running MySQL with a binary update log is another because it captures changes to your data that occur between the backups. If the worst happens to your data, you can resort to your backups to re-create your data.

But in the case of table corruption, you shouldn't have to resort to a backup. In most cases, it's possible to repair a database with the tools that MySQL provides, particularly myisamchk.

Today you will learn:

  • How to check a database for problems

  • How to repair tables that have become corrupted

  • How to optimize tables for performance

  • How ...

Get Sams Teach Yourself MySQL in 21 Days, Second 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.