描述:读mysql binlog日志报错java.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires.
原因:主库有意外重启过,意外发生前主库在一个binlog下面日志写入,因为意外中断,待重新起来的时候会打开一个新的binlog从0开始写。但是这件事情Slave并不知道,它还在一直同步前一个binlog,直到pos位置id大于binlog文件位置上限触发告警。