How to configure auto_increment_offset and auto_increment_increment in mysql
Editor to share with you how to configure auto_increment_offset and auto_increment_increment in mysql, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
There are self-growing fields in mysql, and two self-growing related configurations need to be set when doing primary primary synchronization of the database: auto_increment_offset and auto_increment_increment.
Auto_increment_offset means that since the growth field starts from that number, his value range is 1.. 65535
Auto_increment_increment represents the amount of each increment in the self-growing field. The default value is 1, and the range of values is 1. 65535
In the master master synchronization configuration, the auto_increment_increment growth of both servers needs to be configured to 2, while the auto_increment_offset should be configured to 1 and 2. 0 respectively.
This avoids conflicts between the values of the self-growing fields when two servers update at the same time.
These are all the contents of the article "how to configure auto_increment_offset and auto_increment_increment in mysql". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!