MySQL master-Slave synchronization error, Server-id consistent result error

Source: Internet
Author: User



Today to join a new from the library, to synchronize the master data, but the MY.CNF configuration file directly copied, did not modify the Server-id, resulting in an error:


2017-04-01 14:57:16 140661325472512 [Note] Slave: received end packet from server, apparent master shutdown: 
2017-04-01 14:57:16 140661325472512 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log ‘mysql-bin.000037‘ at position 355680160
2017-04-01 14:57:16 140661325472512 [Note] Slave: received end packet from server, apparent master shutdown: 
2017-04-01 14:57:16 140661325472512 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log ‘mysql-bin.000037‘ at position 355687180
2017-04-01 14:57:17 140661325472512 [Note] Slave: received end packet from server, apparent master shutdown: 
2017-04-01 14:57:17 140661325472512 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log ‘mysql-bin.000037‘ at position 355701274
2017-04-01 14:57:18 140661325472512 [Note] Slave: received end packet from server, apparent master shutdown: 
2017-04-01 14:57:18 140661325472512 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log ‘mysql-bin.000037‘ at position 355723904
2017-04-01 14:57:18 140661325472512 [Note] Slave: received end packet from server, apparent master shutdown: 
2017-04-01 14:57:18 140661325472512 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log ‘mysql-bin.000037‘ at position 355734536
2017-04-01 14:57:19 140661325472512 [Note] Slave: received end packet from server, apparent master shutdown: 
2017-04-01 14:57:19 140661325472512 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log ‘mysql-bin.000037‘ at position 355736849
2017-04-01 14:57:19 140661325472512 [Note] Slave: received end packet from server, apparent master shutdown: 
2017-04-01 14:57:19 140661325472512 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log ‘mysql-bin.000037‘ at position 355740978
2017-04-01 14:57:20 140661325472512 [Note] Slave: received end packet from server, apparent master shutdown: 
2017-04-01 14:57:20 140661325472512 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log ‘mysql-bin.000037‘ at position 355740978






View Master-Slave synchronization status


>show slave status\G;
        Relay_Master_Log_File: mysql-bin.000037
             Slave_IO_Running: Preparing
            Slave_SQL_Running: Yes
              Replicate_Do_DB: 
          Replicate_Ignore_DB: 
           Replicate_Do_Table: 
       Replicate_Ignore_Table: 
      Replicate_Wild_Do_Table: 
  Replicate_Wild_Ignore_Table: 
                   Last_Errno: 0
                   Last_Error: 
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 354949769
              Relay_Log_Space: 30906
              Until_Condition: None
               Until_Log_File: 
                Until_Log_Pos: 0
           Master_SSL_Allowed: No
           Master_SSL_CA_File: 
           Master_SSL_CA_Path: 
              Master_SSL_Cert: 
            Master_SSL_Cipher: 
               Master_SSL_Key: 
        Seconds_Behind_Master: NULL





Encountered this error message:


    1. Find if the Server-id settings on master and slave are the same

    2. Finding slave1 and Slave2 from and from the Server-id setting is the same, which can also cause the problem





Each master and slave master and slave Server-id must be unique, identifying the unique identity of the master-slave Library









MySQL master-Slave synchronization error, Server-id consistent result error


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.