
因主库硬盘空间有限,将其中一个从库作为新的主库使用,变更另一个从库设置从新的主库同步数据。 但发现报错。 show slave status 结果如下:
Master_Host: xx.xx.xx.xx Master_User: slave Master_Port: 3302 Connect_Retry: 10 Master_Log_File: binlog.000008 Read_Master_Log_Pos: 178 Relay_Log_File: relaylog.000006 Relay_Log_Pos: 248 Relay_Master_Log_File: binlog.000008 Slave_IO_Running: No Slave_SQL_Running: Yes Replicate_Do_DB: Replicate_Ignore_DB: mysql,test,information_schema Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Key: Seconds_Behind_Master: NULL Last_IO_Errno: 1236 Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'error reading log entry' Last_SQL_Errno: 0 Last_SQL_Error: 查看 mysql 错误日志有如下提示:
161118 10:36:38 [ERROR] Error reading packet from server: error reading log entry ( server_errno=1236) 161118 10:36:38 [ERROR] Slave I/O: Got fatal error 1236 from master when reading data from binary log: 'error reading log entry', Error_code: 1236
尝试过各种办法, stop slave;start slave;重启,更改 max_allowed_packet 参数,重新设定主库信息和节点均无果 哪位遇到过同样问题,求指点解决办法。