Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export DataBase with MySQL Workbench with INSERT statements

I am trying to export the DataBase i have at MySQL Workbench but I am having troubles to generate the INSERT statements on the .sql file.

I order to export the data, I do the reverse engineering for the database i want to export. Then, i go to

File / Export/ Forward Engineer SQL CREATE Script

And once in there, i select the option Generate INSERT Statements for Tables.

The result only generates the code for the create tables.

Is there any way to create the insert statements for the data?

Thanks

like image 449
Alvaro Avatar asked Nov 06 '12 16:11

Alvaro


People also ask

How do I export SQL data to insert statements?

Right click database >> Tasks >> Generate Scripts. Choose Objects: Select specific database objects >> Select the table you want to export. Set scripting options: Select Save to file then click Advanced. Under advanced >> General Options >> Types of data to script - choose Data only >> Click OK.


1 Answers

For older versions:

Open MySQL Workbench > Home > Manage Import / Export (Right bottom) / Select Required DB > Advance Exports Options Tab >Complete Insert [Checked] > Start Export.


For 6.1 and beyond, thanks to ryandlf:

Click the management tab (beside schemas) and choose Data Export.

like image 96
Vardan Gupta Avatar answered Sep 27 '22 19:09

Vardan Gupta