How to set up data comparison

Data Compare for MySQL Server gives you a perfect opportunity to compare and synchronize data with many useful features. To start a new comparison project, the first thing you need to do is specify two data sources you want to compare, and how to connect to them.

How to select Source and Target:

1. On the File menu, click New > New Data Comparison.

Alternatively, you can click New Data Comparison on the Start Page.

2. In the New Data Comparison wizard that opens, specify the type of the Source and Target, connections, and the names of the databases to be compared. To immediately compare the data, click Compare. To tune the comparison, click Next and proceed to the comparison options.

New Data Comparison window

Select data sources

On the Source and Target page of the New Data Comparison wizard, select the data sources you want to compare. You need to specify both a source and a target.

Note

The Source is the data source that will not change. The Target is the data source that will change.

To swap Source and Target settings, click Swap button

The following types of data source can be compared:

  • Database
  • Scripts Folder

You can select a data source from a Type drop-down list.

Type drop-down list

Note

You can compare data sources of different type, e.g. a database with a scripts folder and vice versa.

Select a database

1. Under Source or Target, select Database from the drop-down list.

2. Under Connection, select the name of the server on which the database resides. You can add a new connection if necessary.

3. Under Database, select a database to be compared.

To refresh the database list, click Refresh on top of the list.

Note

If you need to use a new connection:

1. In the Connection box, click Manage

2. In the Connection Manager window, click New.

New connection

3. In the Database Connection Properties window that opens, specify the details of the connection you want to add and then click Connect.

Database Connection Properties

Select a scripts folder

1. Under Source or Target, select Scripts Folder from the drop-down list.

2. Under Database scripts folder, select the name of the scripts folder or click Browse to browse to the required folder.

Note

You can create a new Scripts Folder.

To do this, click New and specify the details in the window that opens.

Working with scripts folders

A scripts folder is a set of scripts that represent a database schema. The scripts folder can be used for:

  • Version-controlling databases
  • Comparing database schemas
  • Comparing databases on unconnected MySQL servers.

With Data Compare for MySQL Server, you can create a scripts folder from the existing data source. You can do it in the New Data Comparison wizard when you set up the comparison.

How to create a scripts folder

1. In the New Data Comparison wizard, select Scripts folder either as a Source or a Target.

Scripts Folder

2. Click New under Database scripts folder.

3. In the Create Scripts Folder dialog that appears, specify a type of the object, you’re creating a scripts folder from, connection, the name of the database, the output file name, and the folder to save it to.

Create Scripts Folder

By default, Data Compare decrypts encrypted objects. If you want to disable this option, clear the checkbox next to this option. Enabling this option may result in slower performance.

Note

You can create a scripts folder from a database or another scripts folder.

You can customize the scripts folder structure and file names templates. To do this, click Scripts Folder Structure. In the Scripts Folder Structure dialog that opens, you can specify the directories to save your database objects to.

4. Click Create.

Comparing and synchronizing scripts folders

When comparing and synchronizing scripts folders either as the Target or the Source, a synchronization script is created. It can be saved to a file or opened in the internal browser.

When a scripts folder is selected as Source, you can select to execute the synchronization script directly against the target database.

When a scripts folder is selected as Target, you can select to update the scripts folder after synchronization.

Scripts folders synchronization issues

  • We recommend you to enable Ignore spaces in object names and Ignore trailing spaces options when using a scripts folder as a data source. That’s because MySQL server doesn’t always process white space and comments correctly at the beginning and end of the object definition for such objects as views, stored procedures, and rules.

  • When you select a scripts folder as a target data source, comments that are part of a table definition will be lost when the table is modified and the object creation script updated.

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Data Compare for MySQL.
Request a demo

Request a demo

If you consider employing the Data Compare for your business, request a demo to see it in action.
Ready to start using dbForge Data Compare for MySQL?