* Hayan Al Mamoun
> I have two design-identical database, one on my intranet, the other on
> the internet, is there any procedure that Synchronizes the content of
> two databases?

Depends on what you mean with 'Synchronizes'.

'Real' synchronization, where both servers are written to and both must
update eachother in close-to-real-time, is rather difficult, but possible.
The challenge is to avoid duplicate primary keys and other problems arising
from the fact that the data will not be inserted in the same order on both
servers. Your application must be written/re-written with this in mind.

mysql supports replication, both two-way and one-way. Two-way replication is
when multiple servers are written to, and the problems mentioned above
apply.

One-way replication is when one server (the master) is written to, and the
other(s) (the slaves) are only read from. This is pretty straight forward,
and will not require any changes in your application.

<URL: http://www.mysql.com/doc/R/e/Replication.html >

For a simple, one-time transferral of the database from one server to
another server, use mysqldump:

<URL: http://www.mysql.com/doc/m/y/mysqldump.html >

If you just need to synchronize the two databases once, you could try to
'merge' the output of mysqldump from the two databases. If the amount of
data is small, this could be done manually with a text editor, otherwise
some scripting language could be used, reading both files simultaneously and
changing the conflicting primary keys.

--
Roger


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