You may be in the process of using MySQL, all kinds of accidents cause damage to the database table, and this data is often the most recent data, it is often impossible to find in the backup data. This chapter describes how to detect the failure of a MySQL database table.
The general process of fault detection and correction for a table is as follows:
Check for errors in the table. If the table checks through, complete the task, or you must fix the database table that is wrong.
Copy the table files before starting the repair to keep the data secure.
Start repairing database tables.
If the repair fails, restore the data from the backup or update log of the database.
Before you use Myisamchk or isamchk to check or fix a table, you should first note:
Establish database backups and use update logs to prevent repair failures and data loss.
Read this chapter carefully before you do it, especially before reading the "Avoid interaction with MySQL server." Because, before you do not have enough knowledge to operate rashly, can cause serious consequences.
If you are maintaining a table on a UNIX platform, you should first register to a dedicated account MySQL to avoid the problem of ownership of table read and write access, and to destroy all permissions on the database directory.