Maison  >  Article  >  base de données  >  Client requested master to start replication from

Client requested master to start replication from

WBOY
WBOYoriginal
2016-06-07 16:38:251800parcourir

发现数据库同步失败,但没有sql错误,查看错误日志,得到类似错误 ERROR Error reading packet from server: Client requested master to start replication from impossible position ( server_errno=1236) 主服务器发生过一次断电,这个是会导致这个问题。

发现数据库同步失败,但没有sql错误,查看错误日志,得到类似错误

[ERROR] Error reading packet from server: Client requested master to start replication from impossible position ( server_errno=1236)



主服务器发生过一次断电,这个是会导致这个问题。
这个错误必须人工干涉,因为发生这样的错误,不确定是否会产生数据问题,或者发生了别的不可预知的问题。

简单恢复这个问题是重新指定开始的位置,因为上一个日志文件应该是同步完了,没有正常关闭日志,所以不确定是否应该开始从下一个日志开始,我们可以告诉slave从下一个日志开始,记得前后应该停止和开始同步:

CHANGE MASTER TO MASTER_LOG_FILE='下一个日志', MASTER_LOG_POS=4;



参考阅读:
http://www.skysql.com/blogs/adam-donnison/client-requested-master-start-replication-impossible-position
Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn