How to use mysql to automatically fix Myisam_recover _ MySQL

Source: Internet
Author: User
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 )!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.