问题
One server increment 1, 3, 5.
The other server increment 2, 4, 6
回答1:
Based on this insightful tutorial: http://www.howtoforge.com/mysql_master_master_replication#comment-12927
Make Master 1 only auto-increment odd numbers by adding this to my.cnf under [mysqld]:
auto_increment_increment= 2
auto_increment_offset = 1
Make Master 2 only auto-increment even numbers by adding this to my.cnf under [mysqld]:
auto_increment_increment= 2
auto_increment_offset = 2
来源:https://stackoverflow.com/questions/2105719/in-a-master-master-setup-what-command-or-files-do-i-edit-so-that-it-can-auto-in