Can you use MySQL to replicate data over a network from several sites?

Can you use MySQL to replicate data over a network from several sites?

Is MySQL a good fit for replicating from several hundred point-of-sale database sites to a single database over a network that is not always reliable? This is an interim project as we are waiting for a decision that would replace all of our disparate POS systems with a single solution, however in the mean time the data has to be collected and analyzed.

    Requires Free Membership to View

    When you register, my team of editors will also send you resources covering Linux administration and management; integration and interoperability between Linux, Windows and Unix; securing Linux and mixed-platform environments; and migrating to Linux.

    Margie Semilof, Editorial Director

    By submitting your registration information to SearchEnterpriseLinux.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchEnterpriseLinux.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

Typically MySQL replication is used to push data out, not pull it in. For example, it is common to have MySQL run a single master with multiple slaves, and it does not support a single MySQL instance running as a slave to multiple masters.

That being said, it depends on what you want to do. If you are looking for a central backup of multiple MySQL servers, you can run a single machine with multiple instances, each acting as a slave to an individual remote server.

If you want a central analysis machine without two-way replication (data just comes from the remote servers), you could script a process where each remote server ships data to the central machine, or makes it available for pulling. Then the data can be loaded into a central MySQL instance which is used for analysis.

If your systems are pretty disparate, you may need to find a common format like CSV and ship the data to the central server for loading using FTP, Rsync, or the like.

This was first published in June 2005