Incorporating multi-master support in MySQL

Incorporating multi-master support in MySQL

Is there a way to incorporate multi-master support into MySQL?

    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.

    Cathleen A. Gagne, Senior 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.

MySQL interprets multi-master to mean two servers which replicate to each other -- that is, each server is both master to and slave of the other. Implementation is largely the same as any other replication setup, with the exception that the servers should not be permitted to generate the same auto_increment values. This is solved by setting one server to use even numbers, and the other to use odd numbers. The same principle applies to creating a ring of servers; obviously, the auto_increment_increment will need to match or exceed the number of servers in the ring.

See http://dev.mysql.com/doc/refman/5.0/en/replication-auto-increment.html

Multi-master can also mean one slave accepts updates from two different masters. At this time, MySQL does not readily support such a setup with replication. The desired end results might be achieved using MySQL Cluster.

This was first published in July 2007