MySQL主从复制

如果某个主库执行了很多sql操作,导致mysql-bin的位置很大,如下图

从库设置同步的主库时,千万不能设置在这个binlog位置,否则后续的很多主库操作,在从库都会失败,报这种坐标位置等等的错误
Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: Worker 1 failed executing transaction '87d660d6-a194-11ef-873e-0242ac1a0002:337' at source log mysql-bin.000004, end_log_pos 58811831. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any.

这样主库更新操作同步到从库时,会导致从库同步异常,从而最终使从库同步线程异常中断。

应该设置同步坐标为较早的位置:

这样设置后,从库就会从这个较早的坐标开始同步所有的数据库、表、行等数据,然后主库做的更新操作,从库也能同步过来

posted @   vello  阅读(9)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
点击右上角即可分享
微信分享提示