您好,登錄后才能下訂單哦!
MySQL 一臺從庫的錯誤日志,大量報下面的錯誤信息
2018-11-16 15:11:12 10951 [Note] Slave: received end packet from server, apparent master shutdown: 2018-11-16 15:11:12 10951 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000369' at position 255843250 2018-11-16 15:11:12 10951 [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. 2018-11-16 15:20:09 10951 [Note] Slave: received end packet from server, apparent master shutdown: 2018-11-16 15:20:09 10951 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000369' at position 276447773 2018-11-16 15:20:09 10951 [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
這套DB有三臺從庫,而主庫上面通過命令只能看到兩臺從庫
root [(none)]> show slave hosts; +-----------+------+------+-----------+--------------------------------------+ | Server_id | Host | Port | Master_id | Slave_UUID | +-----------+------+------+-----------+--------------------------------------+ | 1373324 | | 3324 | 174144 | 5dfa3e4b-df15-11e8-8c37-06cbe47ccefb | | 174192 | | 3306 | 174144 | b24e27f0-dce5-11e8-bdf4-0cc47a397e1c | +-----------+------+------+-----------+--------------------------------------+ 2 rows in set (0.00 sec)
到缺少的那臺從庫上面檢查server-id,看有沒有和其他從庫相同
server-id并不相同
mysql> show global variables like 'server%id%'; +----------------+--------------------------------------+ | Variable_name | Value | +----------------+--------------------------------------+ | server_id | 2461620 | | server_id_bits | 32 | | server_uuid | b24e27f0-dce5-11e8-bdf4-0cc47a397e1c | +----------------+--------------------------------------+ 3 rows in set (0.00 sec)
排除了server-id,還有可能是DB的uuid相同而導致從數據庫注冊不到主庫。
刪除數據庫目錄下面的server-id文件
# cd /disk1/mysql3320 # cat auto.cnf [auto] server-uuid=11478f92-e973-11e8-8fcf-0cc47a663554 # rm auto.cnf
之后重啟問題從庫,報錯消失。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。