Replication works continuously when the two databases are in contact with
each other, unless you specify otherwise. Likewise, if you connect
periodically, MySql will synchronise the two databases itself.

With replication, MySql logs everything the master does. When a slave logs
in (you can have any number of slaves) it checks the master logs to see how
up to date it is, and 'catches up' with the master.

Once it is set up correctly you don't need to do anything yourself.



Excellence in internet and open source software
tel. 0121-242-1473

-----Original Message-----
From: Martin Hudec [mailto:corwin@;corwin.sk]
Sent: 29 October 2002 08:44
To: Peter Lovatt
Subject: Re[2]: [PHP-DB] database synchronization

Hello Peter,

nice reading....looks like i need to get binary log with queries that
modified some data...okay....and use queries from this log on our
slave database....okay

mysqlbinlog log-file | mysql -h server_name

i suppose server_name is hostname.... but what if this hostname
changes (or IP)....

looks like all i have to do is setup to create binary log on master
(other server with various IPs)....then on our machine i will set up
script which will check for new log files in example each 4 hours and
use them....first question...how will i use queries from logfile to
update mine database? and what if other (master) server is not online
(dialup)? Should i make that master server connect to our
server?...Because i think it will be better to send those log files
directly to slave server with stable and well known IP...and make
remote update....than to try to find changing ip of master
server....that puts me to another problem...what if master is running
windows? I can create these scripts on linux..but what on windows?

Best regards,
 Martin                            mailto:corwin@;corwin.sk

Tuesday, October 29, 2002, 9:29:43 AM, you wrote:

PL> Hi

PL> Take a look at replication

PL> http://www.mysql.com/doc/en/Replication.html


PL> Peter

PL> -----------------------------------------------
PL> Excellence in internet and open source software
PL> -----------------------------------------------
PL> Sunmaia
PL> www.sunmaia.net
PL> tel. 0121-242-1473
PL> -----------------------------------------------

PL> -----Original Message-----
PL> From: Martin Hudec [mailto:corwin@;corwin.sk]
PL> Sent: 29 October 2002 08:18
PL> Subject: [PHP-DB] database synchronization

PL> Hello,

PL>       maybe this is not to be posted here but I am working on this
PL>       using PHP and MySQL (one application for travel agencies)

PL>       Does someone know how to synchronize automatically two
PL>       databases....i have one database running on my server with
PL>       static IP and another, from which we are taking updated records,
PL>       on another computer with static or dynamic IP.....has someone
PL>       tried to solve this?

PL> --
PL> Best regards,
PL>  Martin                          mailto:corwin@;corwin.sk

PL> --
PL> PHP Database Mailing List (http://www.php.net/)
PL> To unsubscribe, visit: http://www.php.net/unsub.php

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to