On Wed, 28 Mar 2001, Aigars Grins wrote:
> Hi,
>
> The short version:
>
> Does anyone know an automated way of keeping two MySQL db's (located on
> different machines) in sync? A small window of non-sync could be acceptable.
>
> The long version:
<snip>
The important question is how much availability (& the ability to survive
network partitions) your looking for:
1) Is simple master --> slave replication good enough for your application ?
all inserts & updates going onto the Master the slave being read only at all
times ?
MySQL has in built support for this (Gamma).
2) Are the queries your performing on the data you capturing 'transactional'
i.e. dependent on the presence/state of the rest of the data set all the time?
If not MySQL + some scripting can be made to re-sync two 'peer' databases
on a regular basis providing you design your insert & update queries carefully
particually incrementing keys. This can be done with the plain text update log
or with timestamped fields. Several people who frequent the list have made
similar applications to this. Here we run two copies of a critical database in
this manner both operating read/write & suviving each other in the event of
failure.
Both of these are documented in the manual, if your application needs fully
distributed transactions, MySQL is not the system your looking for.
Nigel
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php