Hi

If the records are all independant - ie travel agent (TA) A has their own
records and so does TA B then REPLACE INTO MainDB SELECT * FROM
Travel_agent_A_DB so the main database is just receiveing updated records
from the TAs.

Travel agent logs in to master php driven site .
master php driven site logs TA IP
master php driven site makes connection to TA mysql using IP
master php driven site gets new/updated records
master php driven site writes new/updated records to master DB

If more than one travel agent can update the same record then you risk
corrupting the data. If they do not have a live connection to the master
then the record they update may itself be out of date. The only way I can
see of doing this is soem system that locks a record for the period that TA
might take updating it.

Perhaps

TA A login
TA grab record, mark as locked
TA B gets 'locked record' message
TA A updates record and writes back to master
record marked as not locked

HTH

Peter

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

-----Original Message-----
From: Martin Hudec [mailto:corwin@;corwin.sk]
Sent: 29 October 2002 09:18
To: Peter Lovatt
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re[4]: [PHP-DB] database synchronization


Hello Peter,

okay :)))....so far I understand...but....hmmm let me explain....

I have server of travel agencies records (we need to update this, so
it is slave) with stable IP....and then bunch of other computers (from
these we are updating...so they are all masters) in various travel
agencies...but not all of them have stable IP (some joins using
dialup...some have stable line)...some girl there updates
database...and they may not be on net....:).....
So in this case i have one slave and many masters.....

solution one:

My server (slave) has to periodically check for updates....when
masters have stable IP I can make list of IPs and then connect to each
server and take binary update log...and use it....but what can i do
when master has dynamic IP? So i discard this solution....

solution two...better...from my point of view ;):

Masters with stable IP will update in period of for example 4
hours....masters with dynamic IP will update when they are online
(girl browsing on chatting sites ;)))....that puts the question if
there is possible to make remote update (sending binlog from master to
slave and automatically updating slave)(but if i understood your
previous mail...synchronization (replication) is done automaticaly....
the question two is what if this master is running Windows 98 with
MySQL-win for example? Is that possible to make also in windows?

I will try to post this also to mysql list....

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

Tuesday, October 29, 2002, 10:05:00 AM, you wrote:

PL> Hi

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

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

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

PL> HTH

PL> Peter

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


---------------------------------------------------------------------
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



---------------------------------------------------------------------
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

Reply via email to