MySQL database schema compare and diff tool

dbForge Studio for MySQL makes it easy to maintain the consistency of your schemas and data across different environments. With its help, you can compare database schemas, locate and analyze differences in database objects, and synchronize them from a source to a target in no time.

The Studio's Schema Compare feature is designed to help developers, DBAs, and data architects always have a complete picture of differences in databases. What's more, comparison and sync operations can be easily automated for regular execution.

  • Compare live MySQL/MariaDB databases and scripts folders
  • Scrutinize conveniently highlighted differences
  • Share your findings with teammates via comparison reports
  • Generate comparison reports from the command line
  • Sync one database to another with a few clicks
  • Automate regular comparison and synchronization tasks

Introduction to Schema Compare

Want to see how it all works? Check this video! You will see how easy it is to search for the differences between two given databases, review the results in a comparison document, and sync database structures with an autogenerated script that can be saved for reuse.

A wide range of supported database objects

The Studio helps compare the structures of two MySQL or MariaDB databases in a few clicks. It will immediately report on any missing or mismatching database object.

Supported objects include:

  • Tables
  • Views
  • Functions
  • Triggers
  • Events
  • Stored Procedures
  • Sequences
  • Packages
  • Permissions

MySQL database comparison tool - compare tables, views, functions, sequences, packages, stored procedures, triggers, events, permissions

Easy analysis of schema diffs

The comparison results are presented in a perfectly structured document. Convenient highlighting of differences in database objects makes it very easy to spot and analyze them.

  • Search across database objects
  • Filter and sort objects in the results
  • View SQL diffs
  • Exclude objects from synchronization

MySQL schema compare tool - schema diffs analysis

Export of comparison results

How about sharing comparison results with your teammates? No problem! The Studio's Schema Compare generates detailed comparison reports in three widely used formats:

  • HTML
  • XLS
  • XML

The reporting process is highly customizable, and it helps you keep track of differences over a period of time.

MySQL schema synchronization tool - export comparison results

Configurable schema synchronization

Finally, here comes the synchronization of differences from your source database to your target one. It's easy with a handy Schema Synchronization Wizard, which will guide you through the entire process and offer a rich set of options.

  • Select synchronization output
  • View and include dependent objects
  • Add scripts to be executed before and/or after deployment
  • Inspect the action plan and warnings
MySQL compare schema in two databases - Configure the sync

Automated schema comparison and synchronization

What if you need to run regular comparison and synchronization operations as part of a continuous cycle? You got it! The Studio allows generating command-line scripts and saving them to batch files, which can be scheduled for regular execution—or simply run at any given moment.

  • Save MySQL schema comparison and synchronization settings to .bat files
  • Use Command Prompt or PowerShell for automated comparison and synchronization
  • Schedule the execution of .bat files with Windows Task Scheduler or a similar program
MySQL schema diff tool - MySQL schema sync automation and scheduling

How to compare two MySQL databases

Step 1
Select the source and target databases
Step 2
View the results and select objects to sync
Step 3
Run wizard-aided schema synchronization

Conclusion

dbForge Studio for MySQL boasts a bunch of advanced features for MySQL database synchronization, schema and data migration, and automation of recurring operations. You can see it all for yourself by downloading the Studio for a free 30-day trial.

dbForge Studio for MySQL

The most intelligent tool for MySQL development and management

Availability in the editions of dbForge Studio for MySQL

Feature

Enterprise
Professional
Standard
Express
Schema comparison and synchronization tool
Yes
Yes
None
None
Command-line interface for schema comparison and synchronization
Yes
Yes
None
None

Frequently Asked Questions

What is a schema in MySQL?

Essentially, a MySQL database schema is the logical structure of a MySQL database, which comprises tables with rows and columns, relationships, and constraints. This notion applies well to other relational database management systems.

How to connect to a MySQL schema?

The answer depends on the tool you are using. If you are using dbForge Studio, the flow is as follows.

  1. Open the Studio. If you do it for the first time, the Studio will suggest you connect to a MySQL database automatically. Otherwise, you can connect via Database > New Connection.
  2. Either way, the Database Connection Properties dialog opens. There, you need to enter the credentials for your MySQL instance, including Type of connection, Host, Port, User, and Password. After that, select the Database that the required schema belongs to.
  3. Optionally, click Test Connection to make sure the entered credentials are valid.
  4. Finally, click Connect, and you will gain access to your schema.
How to compare MySQL schemas?

To compare schemas using dbForge Studio for MySQL, do the following:

  1. Go to the Comparison menu > New Schema Comparison.
  2. In the New Schema Comparison wizard that opens, specify Source and Target databases and click Next.
  3. On the Options page of the wizard, configure additional options to your requirements.
  4. Click Compare. The results will be delivered in a schema comparison document.