因为主库文件系统出错,恢复后导致从库无法同步,出现以下信息
show slave status;
client requested master to start replication from impossible position
在网上寻找解决方法,有人是将positon向前移(较小positon),有人是向后移,我查看主库binlog文件和大小,并选择了向前移。
导致问题的原因大致是,Mysql主库崩溃,丢失缓存数据没有写进binlog,从库需要同步时,无法从主库读取对应数据。
防止问题发生的方法:
set global sync_binlog=1;
and
Add this line to my.cnf:
sync_binlog = 1
参考文章:
MySQL error 1236: Client requested master to start replication from impossible position
[url]http://dev.kafol.net/2011/09/mysql-error-1236-client-requested.html[/url]
show slave status;
client requested master to start replication from impossible position
在网上寻找解决方法,有人是将positon向前移(较小positon),有人是向后移,我查看主库binlog文件和大小,并选择了向前移。
导致问题的原因大致是,Mysql主库崩溃,丢失缓存数据没有写进binlog,从库需要同步时,无法从主库读取对应数据。
防止问题发生的方法:
set global sync_binlog=1;
and
Add this line to my.cnf:
sync_binlog = 1
参考文章:
MySQL error 1236: Client requested master to start replication from impossible position
[url]http://dev.kafol.net/2011/09/mysql-error-1236-client-requested.html[/url]