Re[2]: [PHP-DB] database synchronization

2002-10-29 Thread Martin Hudec
Hello Peter,

nice readinglooks like i need to get binary log with queries that
modified some data...okayand use queries from this log on our
slave databaseokay

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 themfirst 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 updatethan to try to find changing ip of master
serverthat puts me to another problem...what if master is running
windows? I can create these scripts on linux..but what on windows?


-- 
Best regards,
 Martinmailto: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 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 ---  

PL -Original Message-
PL From: Martin Hudec [mailto:corwin;corwin.sk]
PL Sent: 29 October 2002 08:18
PL To: [EMAIL PROTECTED]
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   databasesi 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




RE: Re[2]: [PHP-DB] database synchronization

2002-10-29 Thread Peter Lovatt
Hi

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.

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 08:44
To: Peter Lovatt
Cc: [EMAIL PROTECTED]
Subject: Re[2]: [PHP-DB] database synchronization


Hello Peter,

nice readinglooks like i need to get binary log with queries that
modified some data...okayand use queries from this log on our
slave databaseokay

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 themfirst 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 updatethan to try to find changing ip of master
serverthat puts me to another problem...what if master is running
windows? I can create these scripts on linux..but what on windows?


--
Best regards,
 Martinmailto: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 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 ---

PL -Original Message-
PL From: Martin Hudec [mailto:corwin;corwin.sk]
PL Sent: 29 October 2002 08:18
PL To: [EMAIL PROTECTED]
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   databasesi 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




Re[2]: [PHP-DB] database synchronization

2002-10-29 Thread Martin Hudec
Hello Juhan,

JK So you can't determine database servers' ip addresses, since they may or
JK may not be dynamic. So don't use the ip address, use hostname and
JK update this hostname every time ip-address changes. You can do it with
JK your own scripts and local host file or you can use public services like
JK www.dyndns.org offers.

well i thought about writing script that will check for connections on
my server on mysql portit will extract IP or hostname of host
making connection and use it in downloading binlog filebut ill
check also that service you mentioned

thank you

-- 
Best regards,
 Martinmailto:corwin;corwin.sk


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