mysql> show slave status \G;
显示

                   Last_Errno: 1594
                   Last_Error: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (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.

查看日志:

2019-10-03 08:53:46 2832 [ERROR] Error in Log_event::read_log_event(): 'read error', data_len: 196, event_type: 31
2019-10-03 08:53:46 2832 [ERROR] Error reading relay log event: slave SQL thread aborted because of I/O error
2019-10-03 08:53:46 2832 [ERROR] Slave SQL: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (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: 1594
2019-10-03 08:53:46 2832 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysqld_bin.001635' position 426553003

原因:所在物理机异常,热迁移了。

解决:
根据日志提示重新制定复制位置就可以了

stop slave;
change master to master_host='10.x.x.x',master_port=xxxx,master_user='xxxx',master_password='xxxxxx',master_log_file='mysqld_bin.001635',master_log_pos=426553003;
start slave;
0 回复
需要 登录 后方可回复, 如果你还没有账号你可以 注册 一个帐号。