• 机房断电导致MySQL同步1594错误


    1、错误信息

    Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the first event 'mysql-bin.001931' at 208645932, the last event read from '/home/mysql/data3002/mysql/mysql-bin.001931' at 208645932, the last byte read from '/home/mysql/data3002/mysql/mysql-bin.001931' at 208645951.'
                   Last_SQL_Errno: 1594
                   Last_SQL_Error: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.

    2、问题解决

      由于使用的是GTID同步,所以不能用change master to master_log_file='mysql-bin.xxx', master_log_pos='xxx';

    mysql> stop slave
        -> ;
    Query OK, 0 rows affected, 1 warning (0.00 sec)
    
    mysql> reset slave;
    Query OK, 0 rows affected (1.38 sec)
    
    mysql> change master to master_auto_position=1;
    Query OK, 0 rows affected (1.02 sec)
    
    mysql> start slave;
    Query OK, 0 rows affected (0.11 sec)

    3、结果查看

    mysql> show slave status G
    *************************** 1. row ***************************
                   Slave_IO_State: Waiting for master to send event
                      Master_Host: xxx
                      Master_User: xxx
                      Master_Port: xxx
                    Connect_Retry: 60
                  Master_Log_File: mysql-bin.001931
              Read_Master_Log_Pos: 77477110
                   Relay_Log_File: mysql-relay.000002
                    Relay_Log_Pos: 408
            Relay_Master_Log_File: mysql-bin.001931
                 Slave_IO_Running: Yes
                Slave_SQL_Running: Yes
  • 相关阅读:
    BZOJ 1726: [Usaco2006 Nov]Roadblocks第二短路
    BZOJ 1708: [Usaco2007 Oct]Money奶牛的硬币
    BZOJ 1642: [Usaco2007 Nov]Milking Time 挤奶时间
    BZOJ 1611: [Usaco2008 Feb]Meteor Shower流星雨
    BZOJ 1610: [Usaco2008 Feb]Line连线游戏
    BZOJ 1609: [Usaco2008 Feb]Eating Together麻烦的聚餐
    BZOJ 1607: [Usaco2008 Dec]Patting Heads 轻拍牛头
    BZOJ 1606: [Usaco2008 Dec]Hay For Sale 购买干草
    BZOJ 1083: [SCOI2005]繁忙的都市
    STL set的用法
  • 原文地址:https://www.cnblogs.com/dukuan/p/8594628.html
Copyright © 2020-2023  润新知