关闭

Got fatal error 1236 from master when reading data from binary log

1184人阅读 评论(0) 收藏 举报
分类:
模拟断电,master和slave非正常关机,slave重启后出现如下错误。
Last_IO_Errno: 1236
Last_IO_Error: Got fatal error 1236 from master when reading data from binary log:
'Client requested master to start replication from position > file size; the first event 'binlog_45_3316.000025' at 1930538,
the last event read from '/mysql5.6/logs/binlog_45_3316.000025' at 4, the last byte read from '/mysql5.6/logs/binlog_45_3316.000025' at 4.'




找到master的binlog,binlog_45_3316.000025找到最后一个POS是1924965,而没有错误中说的是 the first event 'binlog_45_3316.000025' at 1930538


mysqlbinlog -vvv   binlog_45_3316.000025|tail -f|grep "^# at"
# at 1924965


mysql> stop slave;
Query OK, 0 rows affected (0.00 sec)


mysql> CHANGE MASTER TO
    ->   MASTER_PORT=3316,
    ->   MASTER_LOG_FILE='binlog_45_3316.000025',
    ->   MASTER_LOG_POS= 1924965,
    ->   MASTER_CONNECT_RETRY=10;
Query OK, 0 rows affected (0.03 sec)


mysql> start slave;
Query OK, 0 rows affected, 1 warning (0.03 sec)




mysql> show slave status\G 
Last_SQL_Errno: 1755
Last_SQL_Error: Cannot execute the current event group in the parallel mode. 
Encountered event Xid, relay-log name /mysql5.6/logs/relay_45_3316.000002, 
position 288 which prevents execution of this event group in parallel mode. 
Reason: the event is a part of a group that is unsupported in the parallel execution mode.



mysql> set global slave_parallel_workers=0;
Query OK, 0 rows affected (0.00 sec)


mysql> show  variables like '%paral%';
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| slave_parallel_workers | 0     |
+------------------------+-------+
1 row in set (0.00 sec)


mysql> stop slave;
Query OK, 0 rows affected (0.00 sec)




mysql> start slave;
Query OK, 0 rows affected (0.00 sec)               

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:1823959次
    • 积分:21548
    • 等级:
    • 排名:第355名
    • 原创:481篇
    • 转载:6篇
    • 译文:6篇
    • 评论:99条