I've got a Master - Master replication setup and it worked fine for a couple of days but I keep getting: Duplicate entry errors after a few days.
My setup is as follows: One server in The Netherlands and one server in Washington D.C. both servers are running Windows Server 2012 R2 and MySQL 5.6.15 X64.
I've followed this tutorial.
My my.ini
file contains the following:
Netherlands server
server-id = 1
replicate-same-server-id = 0
auto-increment-increment = 2
auto-increment-offset = 1
log_bin=mysql-bin
log_error=mysql-bin.err
binlog_do_db=joomlatest
binlog_do_db=sapp
binlog_do_db=tcadmin
binlog_do_db=whmcs
Washington D.C. server
server-id = 2
replicate-same-server-id = 0
auto-increment-increment = 2
auto-increment-offset = 2
log_bin=mysql-bin
log_error=mysql-bin.err
binlog_do_db=joomlatest
binlog_do_db=sapp
binlog_do_db=tcadmin
binlog_do_db=whmcs
Both servers keep stopping the slave and both report the same: Duplicate entry error. For example:
Error 'Duplicate entry '4353' for key 'PRIMARY'' on query.
How can I prevent this from happening?