Home Forum Software more than one central-server? Reply To: more than one central-server?

#817
Zeb
Participant

I have run MySQL in master-master mode with two nodes. It makes no difference which node an operation is performed on, even simultaneous inserts are fine providing the primary key is an AUTO_INCREMENT column. The key thing is to make sure that the following paramters are configured correctly (for example):

Server 1
server-id = 1
auto_increment_increment = 10
auto_increment_offset = 1

Server 2
server-id = 2
auto_increment_increment = 10
auto_increment_offset = 2

Simultaneous inserts on both servers would have insert IDs of 11 and 12. An insert on node 1 then 2 then 1 then 2 would have the insert IDs: 11, 22, 31, 42.