Ask the Expert

Incorporating multi-master support in MySQL

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

Requires Free Membership to View

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.


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

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: