The disaster caused by Mysqldump's Disable-keys

Source: Internet
Author: User

The mysqldump has a default parameter of Disable-keys, which is turned on by default.
This is not a problem in most cases, but in exceptional cases it can have disastrous consequences.

Recalled a few years ago, a well-known mobile phone forum Day inexplicable magic Brush does not open the Web page, finally no way to stop maintenance small half-day situation, according to the Grapevine, is the problem caused.

The whole process is guessed as follows:

1, their environment is still relatively standardized, with testing and online environment, developers in the test environment with tools to export a portion of the data, need to import into the online environment.
In addition, because of the forum, the current large replacement forum is the MyISAM table engine, this theory happens to be MyISAM (later explained why is MyISAM), laid the foundation of the disaster.

2, ordinary database, this method of operation is completely no problem, but this is a well-known forum, the number of visits is relatively large, the forum of a main table was executed Disable-keys, tragedy happened.




Other than that:
This situation is only for the MyISAM table, for the most use of InnoDB is not a problem.
For older systems such as the Discuz forum, it is important to note that importing data from different environments uses dump to export some of the data and then import it into another environment.

The--disable-keys=false can be used to avoid occurrence in accordance with the above conditions.

The disaster caused by Mysqldump's Disable-keys

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.