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,
For the latest version of MySql Workbench
If you want to export just single table, or subset of data from some table, you can do it directly from result window:
Click export button:
Change Save as type to "SQL Insert statements"
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.
In MySQL Workbench 6.1
.
I had to click on the Apply changes
button in the insertion panel (only once, because twice and MWB crashes...).
You have to do it for each of your table.
Generate INSERT statements for table
You can do it using mysqldump tool in command-line:
mysqldump your_database_name > script.sql
This creates a file with database create statements together with insert statements.
More info about options for mysql dump: https://dev.mysql.com/doc/refman/5.7/en/mysqldump-sql-format.html
I had some problems to find this option in newer versions, so for Mysql Workbench 6.3, go to schemas and enter in your connection:
extended-inserts
Then export the data you want and you will see the result file as this: