Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a database with MySQL Workbench from existing schema/model

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?

like image 397
TheLettuceMaster Avatar asked Jan 23 '14 16:01

TheLettuceMaster


People also ask

How do I create a database from a MySQL Workbench model?

As of MySQL Workbench 8.0, go to the menu item Database > Forward Engineer. After specifying your database connection and model export options, you'll be able to create the database you have designed.

How do I import a model into MySQL Workbench?

Open MySQL Workbench, select the models view from the sidebar in the home screen, click (>) next to Models, and then click Reverse Engineer MySQL Create Script. Find and import the sakila-schema. sql file.

Can you create a database in MySQL Workbench?

Open the MySQL Workbench as an administrator (Right-click, Run as Admin). Click on File>Create Schema to create the database schema. Enter a name for the schema and click Apply. In the Apply SQL Script to Database window, click Apply to run the SQL command that creates the schema.


1 Answers

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.

like image 180
digitai Avatar answered Oct 05 '22 20:10

digitai