mysqlmysql-workbenchdata-synchronization

MySQL Workbench - Get data rows from model to db


I have made a model (EER / ERD) in MySQL workbench. With Database|Forward Engineering I got my data model into a local MySQL database. This has worked fine; I am seeing all the tables, constraints, indexes, ...

But I also have data rows in my model and I expected these to get inserted into the database tables, too. This has not happened.

I can synchronize model and db, but this always only affects the database structure it seems, not the data.

How do I get my data (table rows) from my model into my database?


Solution

  • You can export inserts from the Model by going to the File > Export > Forward Engineer SQL CREATE Script. Check Generate Insert Statements for Tables. Save the SQL file and then run the Script