Databases Reference
In-Depth Information
Goals of synchronization
Although the reasons for wanting to synchronize two databases may be many, we
can group them into the following categories.
Moving between the development and production
servers
A sound database development strategy includes performing development and testing
on a server that is distinct from the production one. If having a separate development
server is not an option, having at least a distinct development database is encouraged.
Over time, differences in structure between test and production environments build
up, and this is normal. For example, a column may be added in the test version, or
character column may be enlarged. The synchronize feature permits us to first see the
differences and then apply them to production if they make sense.
Moving data sometimes needs to be done the other way around, for example, to
populate a test database with real production data in order to measure performance.
Collaboration between database designers
Due to the easy manner in which a MySQL test server can be put in place, the
situation might arise where each member of a development team has his own
server (or his own copy of the database) in which he develops some aspect of a
project. When the time comes to reconcile everyone's changes for the same table, the
synchronize feature is invaluable.
Preparing for replication
MySQL supports asynchronous replication between a master server and one or many
slave servers. This data replication is termed "asynchronous" because the connection
between master and slaves does not need to be permanent. However, to put a
replication process in action (and assuming that the master already contains some
data), one needs to copy all the data over to the slaves. A suggestion to accomplish
this copy is given in the MySQL manual that can found at http://dev.mysql.com/
doc/refman/5.1/en/replication-howto.html , and is mentioned as follows:
"If you already have data on your master and you want to use it to synchronize
your slave, you will need to create a data snapshot. You can create a snapshot using
mysqldump (...)"
 
Search WWH ::




Custom Search