How To Compare Two MySQL Databases
Contents
Introduction
The article is dedicated to Devart dbForge Data Compare for MySQL. With convenient
UI, comprehensive comparison and synchronization wizards, rich settings, high performance,
and stable work of dbForge Data Compare for MySQL you will achieve your goals in
data comparison with the maximum quality and speed.
What is data comparison?
Data comparison is a process aimed at comparing data of two databases (Source and
Target) to find any differences and make data of these databases identical.
Source is a database content of which is inserted to Target after synchronization.
Target is a database content of which you compare and synchronize with Source.
After comparison process is completed, you will be able to view data differences
in databases and analyze them in a special document.
Five stages of data comparison:
- Creating connections to MySQL servers, where the databases to be compared are
located.
- Selecting Source and Target and setting up additional parameters for comparison.
- Mapping required databases in Source and Target manually if automatic mapping
cannot satisfy your specific needs.
- Analyzing comparison results and selecting actions to apply during synchronization
(e.g., Insert, Delete, Update objects).
- Synchronizing data in databases.
Getting data differences of two MySQL databases
Now let's compare two databases using new Data Comparison Wizard available in dbForge
Data Compare for MySQL.
Click Show Data Comparison Wizard on the product Start Page to open
New Data Comparison Wizard.
New Database Comparison Project
Specify the needed connections to MySQL servers in the Connection fields.
Choose MySQL Database Connections
Select the databases you want to compare in the Database fields.
Choose MySQL Databases to Compare
Note, if you want to compare tables in the same database, you may just select Source
connection and database and then just click the Copy source settings to target
button.
Copy Source Settings to Target
When connections are selected, databases are automatically mapped and displayed
in the Database fields. In this fields, you can select the needed target
database to map to the source one from the dropdown list.
Specify additional options of comparison process. Click Next.
Choose Options to Compare MySQL Databases
Select objects that you want to compare. If necessary, specify key columns and the
list of columns for comparison.
Choose Objects to Compare MySQL Databases
Click Compare to start comparison. The wizard closes, and the data comparison
document, where you can view data differences, opens.
View Differences Between MySQL Databases
Analyzing data differences of two MySQL databases
Data comparison document provides you a clear view of differences found in the databases
and offers rich settings to analyze these diffs. When analyzing MySQL databases
diffs, you can:
Filter comparison results in the grid using the Filter list to better understand
them.
Filter Comparison Results in the Grid
See SQL differences of compared objects in the text comparer under the grid.
Analyze DDL Differences in MySQL Objects
If required, include only necessary objects into synchronization by selecting checkboxes
near the needed objects. To exclude objects from synchronization, unselect the checkboxes
next to them.
Choose MySQL Objects to Sync
Conclusion
From this article you have learned how to perform simple actions related to comparing
data in MySQL databases, viewing and analyzing diffs between them.
dbForge Data Compare for MySQL will help you to compare data in MySQL databases
and quickly obtain the comparison results by completing just a few simple steps.