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/
RekenaarDienste
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
2
> live mysql databases, both ways.
> I know I can use a master and slave, and yes have setup a few
without
> any problem, but as all
> of us know this is just a one way downstream sync. I need to sync
both
> 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,
this 
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
might 
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
people 
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).

-Simon

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql 
To unsubscribe:   
http://lists.mysql.com/mysql?unsub=1 


_____________________________________________________________________

University of the Free State: This message and its contents are subject to a disclaimer. 
Please refer to  http://www.uovs.ac.za/disclaimer  for full details. 

Universiteit van die Vrystaat: 
Hierdie boodskap en sy inhoud is aan 'n vrywaringsklousule onderhewig. 
Volledige besonderhede is by http://www.uovs.ac.za/vrywaring  beskikbaar. 
_____________________________________________________________________

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