views:

32

answers:

1

One server increment 1, 3, 5.

The other server increment 2, 4, 6

+1  A: 

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
sibidiba