Does anyone know how to pull a database Scheme Diff for two databases using MySQL Workbench. v5.2 states it has this feature, but I can't seem to find it. I must use MySQL Workbench.
Asked
Active
Viewed 4.8k times
31
-
1You may want to take a look at [this][1]. [1]: http://stackoverflow.com/questions/225772/compare-two-mysql-databases – Skippy Fastol Apr 20 '12 at 14:42
-
How about with MySQL Workbench? – jjwdesign May 07 '12 at 17:35
5 Answers
36
If you don't see this option directly you have to:
- Click
File
andNew model
- On the new model window which has been opened, click
Database
andCompare schemas
.

Avión
- 7,963
- 11
- 64
- 105
-
4this gives a report only about the differences is there any way to generate a script on apply these to the DB directly – AnAs51993 Mar 01 '19 at 18:54
18
The database diff tool is part of the MySQL Utilities that you can access through MySQL Workbench in Plugins -> Start Shell for MySQL Utilities
. You can find the relevant documentation here.
-
1The [`mysqldbcompare`](https://docs.oracle.com/cd/E17952_01/mysql-utilities-1.6-en/mysqldbcompare.html) tool, which uses mysqldiff I think, may be a better option for a whole database. I'm using `--run-all-tests --skip-row-count --skip-data-check` options to get only schema differences. Only downside I see so far is it just notifies of any objects missing in one of the databases rather than providing `CREATE` statements when using `--difftype=sql`. – topshot Sep 21 '18 at 20:44
16
Just go to File->New Model, then Database -> Synchronize with any source. You have to be in model view to see this option in the Database menu.

Max
- 541
- 6
- 9
6

jmhostalet
- 4,399
- 4
- 38
- 47
-
4This menu option is not available until after generating an EER Diagram. Maybe explain how where Model View is? – Master James Jan 24 '17 at 09:22
-
3Don't have to create an EER diagram. Just click New Model and then go to mentioned option. – M_R_K Feb 15 '21 at 02:03
-
You wont get this menu unless you follow these steps Just go to File->New Model>Databases>Compare... – Muhammad Umar Oct 03 '22 at 17:13
0
I have developed a tool that can be used to compare two Databases. This Tool only works with MySQL. This tool generates SQL for Target Database to sync the database. This is a web application tool built in CakePHP 2, you have to download code put into xammp->htdocs in case of windows, and make a virtual domain before using it. For more information goto below Link

Hardeep Singh
- 743
- 1
- 8
- 18
-
Sir, I edit the answer as you commented. This is a free tool, just want to make an easy database syncing process. – Hardeep Singh Jul 14 '22 at 03:45
-