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