您好,登錄后才能下訂單哦!
今天新加入一臺從庫,進行同步master數據,但是my.cnf配置文件直接拷貝,沒修改server-id,導致報錯:
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
查看主從同步狀態(tài)
>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
遇到該報錯信息:
查找master和slave主從上的server-id設置是否相同
查找slave1和slave2從和從之間的server-id設置是否相同了,也會導致該問題
每臺master和slave主從庫的server-id都必須唯一,識別主從的庫的唯一標識
免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。