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

Slave: received 0 length packet from server, apparent master shutdown

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

It's the reason for the parameter server-id again.

[@ more@]

After checking the database on the first day of the festival, I found that a mysql slave reported a large number of

Slave: received 0 length packet from server, apparent master shutdown.

The log file is already 2g. But the data is still going. Try stop slave and start slave again, and report an error:

Error reading packet from server: log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master (server_errno=1236)

Check again that mt.cnf is really caused by the repetition of server-id and other slave. The first error is ok under reset, and the second error may be caused by using LOAD DATA or mysqlimp. The way to avoid it is to first load the text to load to the temporary library that is not copied on the master and slave 2, and then insert it into the replicated table by the way of sql. In this way, only sql will be transferred without a large amount of data transmission. There is no need to change the max_allowed_packet, otherwise you can change it according to the prompts of mysql, but you will have to change the data again next time, and you will have to stop master. This doesn't work every time in a production environment.

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