MySQL Workbench model/source synchronize issue

MySQLmysql-workbench

I've been looking all over for any description of an issue like this and I haven't found anything so far.

I am trying to update my MySQL database using MySQL Workbench (5.2.40 CE). I am using the Synchronize Model option just as I have always done before to update the database with the changes I've made to the model. Main thing to note here is that the issue I'm going to describe happens even without any changes being made to the model.

The problem is when it gets to the point where it shows "Model and Database Differences", the fields which all normally line up between Model and Source are totally off.
I get everything doubled with the first set showing the Model names of my Schema and Tables with the Sources next to all of them showing N/A. Then below that it has all of the Source values filled in while the Model values all say N/A.

If I run the update as it is my database does get updated, but it also completely wipes out all the information on the database because it is dropping all the tables and re-entering them. Here is the picture of what the page looks like.

workbench image

I have no idea if this is some kind of setting or bug. But on my test database after totally getting wiped out and trying it again, the Differences page shows up normally with everything 1:1 like it should, and it updated just fine.

Any clues on this would be appreciated.

Best Answer

MySql Workbench is powerful, but not perfect.

Some time in similar case, I've done the following to resolve the problem:

  • create a blank project
  • require a model update FROM db source
  • then I'll reapply the mod.

Often this happen if you just change a 'comma' [a small thing] in the db without sync it with the model, and then you change another 'comma' in the model. MySql Workbench goes crazy often as db increases in complexity and table number, but I think it's a very good product.