具体错误如下: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 'mysql-bin.000878' at 140901428, the last event read from '/home/mysql/log/mysql-bin.000878' at 4, the last byte read from '/home/mysql/log/mysql-bin.000878' at 4.'
先到主服务器上把这个mysql-bin.000878导出来:
mysqlbinlog /home_ex/mysql/log/mysql-bin.000878>/home/1.txt
然后在/home/1.txt里找到最接近140901428的position
然后在从服务器上
stop slave;
change master to master_log_file='mysql-bin.000878',master_log_pos=140901428;
start slave;
OK啦!