Problems caused by duplicate server-id synchronization between multiple mysql databases _ MySQL

Source: Internet
Author: User
Problems caused by duplicate server-id synchronization between multiple mysql databases bitsCN.com

Today, after setting up a new SLAVE database server, we found that there were a large number of TIME_WAIT database connections between the MASTER and SLAVE servers:
Tcp 0 0 19.2.33.156: 56247 19.424228: 3306 TIME_WAIT
Tcp 0 0 19.2.33.156: 56241 19.424228: 3306 TIME_WAIT
Tcp 0 0 19.2.33.156: 56150 19.424228: 3306 TIME_WAIT
Tcp 0 0 19.2.33.156: 56144 19.424228: 3306 TIME_WAIT
Tcp 0 0 19.2.33.156: 56147 19.424228: 3306 TIME_WAIT
Tcp 0 0 19.2.33.156: 56174 19.424228: 3306 TIME_WAIT
Tcp 0 0 19.2.33.156: 56160 19.424228: 3306 TIME_WAIT
Tcp 0 0 19.2.33.156: 56162 19.424228: 3306 TIME_WAIT
Tcp 0 0 19.2.33.156: 56066 19.424228: 3306 TIME_WAIT
Check the error log on the newly added server load balancer, and the following error message appears:
110826 15:44:14 [Note] Slave: deployed ed end packet from server, apparent master shutdown:
100826 15:44:14 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'MySQL-bin.000017' at postion 239813
100826 15:44:15 [Note] Slave I/O thread killed while reading event
After checking, we found that two SLAVE servers have the same server-id settings. after changing one of the server-IDs and restarting the service, the database synchronization returns to normal. many people are used to copying my. when configuring database synchronization in the cnf file, remember to change the server-id. it is difficult to locate the cause of the error when this error message is first encountered. Why can't mysql report error messages that can better locate the cause ?.


This article is from the "IT milk" blog

BitsCN.com

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.