Creating a database with MySQL Workbench from exis

2019-04-21 20:51发布

I built a database schema (or Model?) with MySQL Workbench. I'd like to now make it into an actual database.

I've seen Forward and Reverse engineer options and can't find a clear answer on if either are what I need.

How can I turn this into an actual database?

3条回答
做自己的国王
2楼-- · 2019-04-21 20:52

This for mysql workbench version 6.0 and for exporting a schema.

Select tab MySQL Model
Select File->Export->Forward Engineer SQL Create

Place a file name to be exported in the Output SQL Script File, choose your options, next

Export MySQL table Objects,  
filter tables 

Then a file is created which you can import to your database and it creates schemas if not exists, creates tables if not exists.

In the case of models, you need to pay, many bucks, for a tool that creates schemas, tables, indexes, cascading, and all stuff associated to an existing data model.

查看更多
劳资没心,怎么记你
3楼-- · 2019-04-21 20:55

In order to realize a modeled schema structure on a real server you would use either forward engineering or synchronization. The first is if you have just the model and want it to create all the objects in the target schema(s). Synchronization on the other hand is a means to synchronize your model and an existing schema (two-way). That is, objects not existing or changed in your model are created or adjusted on the server and vice versa. There's no need to create a separate SQL script and apply that manually.

For both action see the Database menue in MySQL Workbench when a model is open.

查看更多
贪生不怕死
4楼-- · 2019-04-21 21:11

The official documentation has a relevant article.
http://dev.mysql.com/doc/workbench/en/wb-getting-started-tutorial-creating-a-model.html

Jump to step 11.

查看更多
登录 后发表回答