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

模拟断电,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)               

阅读更多
个人分类: MySQL
上一篇log event entry exceeded max_allowed_packet
下一篇Slave failed to initialize relay log info structure from the repository
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭