Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

MySQL error Slave: received end packet from server, apparent master shutdown

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

MySQL a slave database error log, reporting a large number of the following error messages

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 log O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000369' at position 2558432502018-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 Chara O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000369' at position 2764477732018-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.

There are three slave libraries in this set of DB, but only two slave libraries can be seen in the master database through the command.

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)

Check the server-id from the top of the library to see if it is the same as other slave libraries.

Server-id is not the same.

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)

Excluding server-id, it is also possible that the uuid of DB is the same, resulting in not registering to the main database from the database.

Delete the server-id file under the database directory

# cd / disk1/mysql3320# cat auto.cnf [auto] server-uuid=11478f92-e973-11e8-8fcf-0cc47a663554# rm auto.cnf

Then the restart problem disappears from the library and the error report disappears.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report