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.4k times
30
-
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
4 Answers
34
If you don't see this option directly you have to:
- Click
FileandNew model - On the new model window which has been opened, click
DatabaseandCompare schemas.
Avión
- 7,245
- 9
- 60
- 100
-
3this 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
15
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
- 481
- 5
- 9
4
jmhostalet
- 3,961
- 4
- 36
- 42
-
2This 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
-
1Don'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