Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I generate a SQL script from my diagram in MySQL Workbench?

I've created an EER diagram with tables, foreign keys, etc in MySQL Workbench and now I want to generate a ".sql" script that will create this database. How do I do that?

like image 872
Don Rhummy Avatar asked Aug 06 '13 18:08

Don Rhummy


People also ask

How do I create a database script 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.

How do I create a SQL script diagram?

Create a SQL Database Diagram Use either of the following options: On the File menu, select New and then click Database Diagram. On the Database menu, click Database Diagram. On the Start Page > Database Design dashboard, click New Database Diagram.


1 Answers

Try: File->Export->Forward Engineer SQL CREATE Script

like image 197
Dirk McQuickly Avatar answered Sep 19 '22 04:09

Dirk McQuickly