Linux MySQL Master/Slave synchronization fails, and an error 1594 is returned

Source: Internet
Author: User
Tags mysql code


The master-Slave synchronization of mysql fails. the following error is reported in the log: 120309 18:39:23 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000004 'at position 2207467, relay log '. /mysqld-relay-bin.000011 'position: 2207613 120309 18:39:23 [ERROR] Error in Log_event: read_log_event (): 'read error', data_len: 166, event_type: 2120309 18:39:23 [ERROR] Error reading relay log event: slave SQL thread aborted because of I/O error120309 18:39:23 [ERROR] Slave SQL: 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. error_code: 1594120309 18:39:23 [ERROR] Error running query, slave SQL thread aborted. fix the problem, and restart the slave SQL thread with "SLAVE START ". we stopped at log 'mysql-bin.000004 'position 2207467

The main cause of the analysis is the power failure, which causes an error in reading the binlog. According to some information on the Internet, the solution is: 1 stop slave; 2 change master to3 master_host = '2017. 168.1.251 ', 4 master_user = 'repl', 5 master_password = 'Password', 6 master_log_file = 'mysql-bin.000004', 7 master_log_pos = 2207467; 8 start slave; this will fix the problem. the above synchronization file and synchronization point pos are the location where the last record is reported in the log. author: php-oa

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.