The solution to mysql unique prefix myisam_recover instead of myisam recover options

  • 2021-01-06 00:45:28
  • OfStack

It literally means you have to write all the parameters. This is not supported in later versions.

Many online information are directly using myisam_recover can achieve mysql database table repair, but in the new version of the need to add parameters can be.

The original:


myisam_recover

Now:


myisam_recover_options=force,backup

Automatically fixes myisam tables for MySQL

Common MySQL children's shoes all know that this myisam type table is very easy to damage, most people may be using myisamchk command to artificial repair, the following introduction of 1 automatic repair myisam method, is also my morning just learned, progress together, ha ha ~
In my.cnf configuration file of MySQL, myisam-recover is added in the boot item part to set data recovery function. The specific parameters are as follows:

DEFAULT

与没有使用--myisam-recover选项相同。

BACKUP

如果在恢复过程中,数据文件被更改了,将tbl_name.MYD文件备份为tbl_name-datetime.BAK。

FORCE

即使.MYD文件将丢掉多个行也进行恢复。

QUICK

如果没有删除块,不要检查表中的行。

I set the BACKUP and FORCE parameters as follows:
[mysqld]
myisam-recover=BACKUP,FORCE
This parameter details, please refer to the manual MySQL http: / / dev mysql. com/doc refman / 5.0 / en/server - options. html.


Related articles: