Syncing updates to master in master/slave setup [semi-sync replication]
You are almost there. I guess you have missed the auto_increment_increment &amp; auto_increment_offset variables.

Set auto increment increment to the total number of servers.

Set auto_increment_offset to a number between 1 and auto increment increment for each server.

example:

Server 1: auto increment increment = 2, auto_increment_offset = 1

Server 2: auto increment increment = 2, auto_increment_offset = 2