Recovery from replicated upted mysql replication

Source: Internet
Author: User
Tags mysql code

Recovery from corrupted mysql replication directly copies the wiki of the company I edited. Relay log resume uption example: You can get error info after SHOW SLAVE STATUS; Last_Error: Relay log read failure: cocould not parse relay log event entry. the possible reasons are: the master's binary log is upted (you can check this by running 'mysqlbinlog' on the binary log ), the slave's relay log is already upted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. if you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'show SLAVE status' on this slave. in most cases, it shocould be caused by a network problem which leads to a previous uption of relay log. and this problem can be fixed quite easily. so when you get error, first try this to see if it works.1. stop the slave and get info by "show slave status;" 2. note down values of these two fields: "Relay_Master_Log_File", "Exec_Master_Log_Pos" For example> Relay_Master_Log_File = mysql-bin.000287> Exec_Master_Log_Pos: 9722398353. bypass the upted relay log bymysql> change master TOmysql> MASTER_LOG_FILE = 'mysql-bin.000287 ', mysql> MASTER_LOG_POS = 972239835; mysql> start slave;

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.