MySQL主从同步报Client requested master to start replication from position
数据库版本:5.6.16
测试环境MySQL 主从,数据库被人重启,忘记开启start slave,导致主从失效,停了一天的数据没有追上。
查看从库的数据库状态:
show   slave   status\G
提示Client requested master to start replication from position > file size;  还有最后一次执行的日志点,26519749,二进制日志位置mysql-bin.000002
解决办法:
在主库的日志目录下,执行:
mysqlbinlog mysql-bin.000002 > yoon.log
tail  -f   yoon.log 
#150928 16:58:18 server id 578  end_log_pos 26423110 CRC32 0x57ea8c95 Xid = 4675985
end_log_pos 26423110 比 报错提示的26519749小很多,直接从这个点开始重新配置主从
在从库
change master  to master_host='172.168.3.78',master_port=3306,master_user='master',master_password='master',master_log_file='mysql-bin.000002',master_log_pos=26423110;
查看从库状态,主从OK,等着追上来~~~~
 
                    
                
 
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号