This article describes how to use Myisam_recover to automatically fix Myisam. For more information, see Myisam_revocer.
Automatically repair MySQL myisam table
MySQL children's shoes often know that myisam tables are very vulnerable to damage. most people may use myisamchk commands for manual repair. The following describes a method to automatically repair myisam, I just learned this morning and made progress together ~
In the MySQL configuration file my. cnf, add myisam-recover to the startup item to set the data recovery function. the specific parameters are as follows:
DEFAULT |
It is the same as the -- myisam-recover option. |
BACKUP |
If the data file is changed during the recovery processTbl_name. MYD file backup isTbl_name-datetime. BAK. |
FORCE |
The. MYD file will be restored even if multiple rows are lost. |
QUICK |
If the block is not deleted, do not check the rows in the table. |
Usage: in my. ini, add
The code is as follows:
myisam_recover_options=force,backup
The above is the usage of Myisam_recover in mysql _ MySQL. For more information, see PHP Chinese website (www.php1.cn )!