How to get SQL script from MySQL Workbench .mwb file programatically?

59 Views Asked by At

My db schema is designed in MySQL Workbench and saved as a .wmb file. In my Vagrantfile I want to generate the SQL schema for my db and then load it. Smth like this:

MySQLWorkbench --generateSQL design.wmb --output schema.sql

so that later i can do this

mysql < 'schema.sql'

Can't seem to find the CLI for MySQLWorkbench to do this. Is this possible? Or other suggestions to achieve the same result.

I found this answer How to generate SQL Script from MySQL Workbench using Command Line?

but it's half-baked and I don't understand how to input my design file name into the script in order to get the SQL out. And I don't have enough rep to post a follow-up question in that thread.

0

There are 0 best solutions below