• 关于mysql 主从同步错误解决方法


    在主库上执行  show slave statusG;

     Slave_IO_Running: No

    Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'

    主从同步时, 从库的io线程拉取主库的日志发现主库的index文件中第一个文件不存在,由于从库之前从库停止了一段时间,当start slave 时,会找不到主库相对应的binlog文件。

    解决方法:

    1.在从库上执行stop slave;

    2.在主库上执行 show master status;

    3.在从库上执行change master语句;

     change master to master_host="主库的地址",master_user="同步用户",master_password="同步用户的密码",master_log_file="主库的file文件",master_log_pos=主库的position;

    4.在从库上执行 start slave;

    最后在执行 show slave statusG;

    从库的同步状态显示正常。

    思考问题:

      这样重新执行change master,会不会和主库的数据存在差异呐?

    学习是一种信仰
  • 相关阅读:
    R必学包之dplyr
    PSO(Thepopularity-similarity-oplimization) modol
    社区发现(Community Detection)算法
    Louvain algorithm for community detection
    路由算法
    github学习
    win10+Linux18.04双系统安装
    KBEngine源码:Entity
    skynet源码分析:timer
    skynet源码分析:Socket
  • 原文地址:https://www.cnblogs.com/nickxr/p/10216087.html
Copyright © 2020-2023  润新知