Reputation: 3777
I want to take the whole database. Where do I find the database file?
And is there a way to write the whole database with all data to a text file (like the one in SQL Server)?
Upvotes: 84
Views: 239811
Reputation: 1
There is one easy step behind mysql workbench's data_export method
where in mysql workbench's home after you logged in
Upvotes: 0
Reputation: 15441
Using Windows 10 and MySql Workbench 8.0
This opens up something like this
Upvotes: 2
Reputation: 1244
None of these worked for me. I'm using Mac OS 10.10.5 and Workbench 6.3. What worked for me is Database->Migration Wizard... Flow the steps very carefully
Upvotes: 3
Reputation: 19015
I found this question by searching Google for "mysql workbench export database sql file". The answers here did not help me, but I eventually did find the answer, so I am posting it here for future generations to find:
Answer
In MySQLWorkbench 6.0, do the following:
Here is a screenshot for reference:
Upvotes: 12
Reputation: 11
in mysql workbench server>>>>>>export Data then follow instructions it will generate insert statements for all tables data each table will has .sql file for all its contained data
Upvotes: 0
Reputation: 24502
Q#1: I would guess that it's somewhere on your MySQL server? Q#2: Yes, this is possible. You have to establish a connection via Server Administration. There you can clone any table or the entire database.
This tutorial might be useful.
EDIT
Since the provided link is no longer active, here's a SO answer outlining the process of creating a DB backup in Workbench.
Upvotes: 31
Reputation: 6039
Surprisingly the Data Export in the MySql Workbench is not just for data, in fact it is ideal for generating SQL scripts for the whole database (including views, stored procedures and functions) with just a few clicks. If you want just the scripts and no data simply select the "Skip table data" option. It can generate separate files or a self contained file. Here are more details about the feature: http://dev.mysql.com/doc/workbench/en/wb-mysql-connections-navigator-management-data-export.html
Upvotes: 0
Reputation: 4558
In MySQL Workbench 6, commands have been repositioned as the "Server Administration" tab is gone.
You now find the option "Data Export" under the "Management" section when you open a standard server connection.
Upvotes: 14
Reputation: 1824
Database > Reverse Engineer
and follow the prompts. The wizard will lead you through connecting to your instance, selecting your database, and choosing the types of objects you want to reverse engineer.
When you're all done, you will have at least one new tab called MySQL Model. You may also have a tab called EER Diagram which is cool but not relevant here.Database > Forward Engineer
Copy to Clipboard
or Save to Text File
. The wizard will take you further, but if you just want the script you can stop here.
A word of caution: the scripts are generated with CREATE
commands. If you want ALTER
you'll have to (as far as I can tell) manually change the CREATEs to ALTERs.
This is guaranteed to work, I just did it tonight.
Upvotes: 112
Reputation: 3055
Try the export function of phpMyAdmin.
I think there is also a possibility to copy the database files from one server to another, but I do not have a server available at the moment so I can't test it.
Upvotes: 2
Reputation: 51868
In the top menu of MySQL Workbench click on database and then on forward engineer. In the options menu with which you will be presented, make sure to have "generate insert statements for tables" set.
Upvotes: 2