ITPub博客

首页 > 数据库 > MySQL > MySQL主从同步报Client requested master to start replication from position

MySQL主从同步报Client requested master to start replication from position

原创 MySQL 作者:haoge0205 时间:2015-09-29 17:07:40 0 删除 编辑
数据库版本: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,等着追上来~~~~


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28939273/viewspace-1811799/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2013-11-28

  • 博文量
    300
  • 访问量
    1893493