Showing entries 1 to 3
Displaying posts with tag: master master replication (reset)
MySQL Master-Master Replication

Master-Master Replication

Creating and maintaining a duplicate copy of a database or file system on a different computer, typically a server.  The term usually implies the intelligent copying of parts of the source database which have changed since the last replication with the destination.

Replication may be one-way or two-way.  Two-way replication is much more complicated because of the possibility that a replicated object may have been updated differently in the two locations in which case some method is needed to reconcile the different versions.

We have seen how the one-way replication works i.e. Master-Slave; here whatever changes are updated on the Master server is replicated onto the Slave server.

Two-way replication i.e. Master-Master replication will be bit different. As the name itself suggests both the servers will be Master to another.

Master-Master replication allows data in …

[Read more]
MySQL Master Master Replication and auto_increment_increment / auto_increment_offset

In this post we will see importance of replication related variables auto_increment_increment & auto_increment_offset with respect to MySQL Master Master setup. Consider we’ve already set a master-master replication. Now create…

The post MySQL Master Master Replication and auto_increment_increment / auto_increment_offset first appeared on Change Is Inevitable.

How to sync tables in master-master MySQL replication

Suppose you have a master-master replication setup, and you know one of the tables has the wrong data. How do you re-sync it with the other server?

Warning: don’t just use any tool for this job! You may destroy your good copy of the data.

If your table is large, you’ll probably want to use a tool that can smartly find the differences in a very large dataset, and fix only the rows that need to be fixed. There are several tools that are either able to do this, or claim to be able to do this. However, most of them are not replication-aware, and are likely to either break replication or destroy data.

To see why this is, let’s look at a typical scenario. You have server1 and server2 set up as co-masters. On server1, your copy of has correct data. On server2, somehow you are missing a row in that table. A hypothetical sync tool will compare the two copies of the data and find …

[Read more]
Showing entries 1 to 3