List:General Discussion« Previous MessageNext Message »
From:Cecil Brand Date:May 26 2005 7:02am
Subject:Re: Sync 2 live MySQL Databases
View as plain text  
This is precisly the problem that I'm sitting with. It look like unless

MySQL AB desides to build such a feature into one of the future 
releases this would beable to work.

Mnr Cecil J.C. Brand
Computer Services/
University of the Free State/
Universiteit van die Vrystaat
PO Box 339
Bloemfontein 9300
South Africa

Tel   :401 2940
Email :BrandC.RD@stripped

>>> Simon Garner <sgarner@stripped> 5/26/2005 8:56:14 AM >>>
On 26/05/2005 6:40 p.m., Cecil Brand wrote:
> Hi,
> I was wandering if anyone know of a stable and reliabile way to sync
> live mysql databases, both ways.
> I know I can use a master and slave, and yes have setup a few
> any problem, but as all
> of us know this is just a one way downstream sync. I need to sync
> ways and basicly live, the every
> 5 or 10 min cronjob sync with a perl/php/c++ app just won't cut it.

Unfortunately, the simple answer is you can't.

While it is possible to set up multi-master replication with MySQL,
is not useful for the vast majority of applications. If you are sending

write queries to both masters then you have the possibility of the two

servers becoming out of sync. This is particularly true with 
auto_increment primary keys - if you have a table and you send one 
insert statement to each server,  both at the same time, then they
both assign the same auto_increment number to each row, and then they 
will both be forced to ignore the replicated inserts they receive from

each other - screwing your table.

Your options are to use MySQL Cluster (not an option for a lot of
as your entire database has to be stored in RAM), or if you're just 
after high availability, set up one-way replication with dynamic master

failover (which I am currently trying to figure out how to do myself).


MySQL General Mailing List
For list archives: 
To unsubscribe: 


University of the Free State: This message and its contents are subject to a disclaimer. 
Please refer to  for full details. 

Universiteit van die Vrystaat: 
Hierdie boodskap en sy inhoud is aan 'n vrywaringsklousule onderhewig. 
Volledige besonderhede is by  beskikbaar. 

Sync 2 live MySQL DatabasesCecil Brand26 May
  • Re: Sync 2 live MySQL DatabasesSimon Garner26 May
Re: Sync 2 live MySQL DatabasesCecil Brand26 May