The reset Slave reset command for MySQL replication

Source: Internet
Author: User

      • Http://www.it165.net/database/html/201208/2801.html
      • Sometimes you want to clear all replication information from the library, such as switching to a different master, master-slave redo, and so on; the reset slave is a dangerous command, so be sure to be prepared to know what it means before you execute it.

        1. The command is executed on the slave and must be stopped before execution slave (stop slave)
        2. After you perform reset slave, all information related to replication is cleared, including: Master.info, relay-log.info, and unconditional removal of all relay logs (relay logs). Note that it is unconditional, that is, not managing your slave SQL thread to replay all relay logs.
        3. Note that after the stop slave, save the show slave status information before performing the reset slave. This information will be useful in general.

        Www.it165.net
        Online used once, due to the master-slave inconsistency, and xtrabackup to restore the data, at that time, understanding is not too clear, and urgent, so on the implementation, redo; At that time, the heart still has no end.
        Also explained that: do not use the master-slave data Catalog to compare the master-slave, this is a completely stupid way, that is, when executed, a look at the directory of the main cubby from the library dozens of M, at that time on the heartbeat, check the specific data, are the same, do not scare themselves, hehe.


        So before executing the command, you must fully understand what happens when this command goes down, and whether it affects production applications.

  • Extended reading:
    • 1. MySQL 4 Timeout parameter explanation
    • 2. Security solution in MySQL database
    • 3, optimize the MySQL dynamic site Index analysis speed
    • 4, MySQL novice use the first step to get started
    • 5. Correctly solve the problem of ignoring users in MySQL
    • 6, Linux on the establishment of the MySQL image database
    • 7. mysql dual-Machine hot backup method
    • 8. How to repair MySQL data file after corruption

The reset Slave reset command for MySQL replication

Related Article

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.