3.1.5 How Can I Synchronize a Table on Two Servers Where Neither is Up-to-date? Objectives Example Execution Discussion Permissions Required Tips and Tricks

When working with servers that are used in different networks or are compartmentalized, or simply intentionally manually redundant (they do not use replication), or perhaps through some crisis, you may encounter a situation where a table (or an entire database) becomes out of synch.

We don't simply want to know which rows differ, rather, we need to know the SQL statements needed to bring the tables into synch. Furthermore, we aren't sure which table is most out of date so we'd like to see the transformation statements for both directions.

In this case, it would be very helpful to know exactly how the tables differ. For this, we use the mysqldbcompare utility.