Documentation Home
MySQL and Windows
Related Documentation Download this Excerpt
PDF (US Ltr) - 3.6Mb
PDF (A4) - 3.6Mb


MySQL and Windows  /  MySQL for Visual Studio  /  MySQL Data Export Tool

5.8 MySQL Data Export Tool

MySQL for Visual Studio has a data export tool that creates a dump file for a MySQL database.

Figure 5.49 MySQL for Visual Studio Data Export Tool: Main Window

Screen capture of MySQL for Visual Studio Database Export Tool: Main Window

Creating a Dump of an existing MySQL Database

To open a new window for the MySQL Data Export tool, you must first create a new connection using the Server Explorer window inside Visual Studio. After the connection is established, a contextual menu can be opened by right clicking on the connection node. From the menu, choose the MySQL Data Export option. A new tab opens for the current connection. You can then select one or more databases to include in the dump.

Figure 5.50 MySQL for Visual Studio Data Export Tool: Connection Context Menu

Screen capture for MySQL for Visual Studio Database Export Tool: Connection Context Menu

Follow these steps to create a dump for the MySQL Databases:

  1. Select all the databases and their objects to be included in the dump.

    Figure 5.51 MySQL for Visual Studio Data Export Tool: Selecting a Database

    Screen capture for MySQL for Visual Studio Data Export Tool: Selecting a Database

  2. It is very important to select the desired settings for the dump: whether the dump will include the data, whether the insert operations will be logged in extended mode, and so on. In the main window of the MySQL Database Export tool are shown the basic options for the dump. Also, by clicking on the Advanced button, more specific options can also be selected.

    Figure 5.52 MySQL for Visual Studio Data Export Tool: Advanced Options

    Screen capture for MySQL for Visual Studio Data Export Tool: Advanced Options

  3. When the selection of the options is done, give a name to the result file that will be created. If no path is given for the result file, the default path to be used is My Documents under the user's folder.

    Figure 5.53 MySQL for Visual Studio Data Export Tool: Generating the Dump File

    Screen capture for MySQL for Visual Studio Data Export Tool: Generating the Dump File

  4. A filter can be applied on the list of schemas for the selected connection. With it, the user can easily locate the databases to be included in the dump.

    Figure 5.54 MySQL for Visual Studio Data Export Tool: Filtering the Schemas

    Screen capture for MySQL for Visual Studio Data Export Tool: Filtering the Schemas

  5. After selecting the options and the name for the dump file, the user can click the Export button, which generates the dump.

    Figure 5.55 MySQL for Visual Studio Data Export Tool: Viewing the Generated Script

    Screen capture for MySQL for Visual Studio Data Export Tool: Viewing the Generated Script

Each dump can have different settings. After configuring the dump operation, the settings can be saved into a setting file for later use. This file includes: the connection selected, the name of the file for the dump, and the database or databases and the objects selected for dumping. The file extension for the setting file is .dumps.

Figure 5.56 MySQL for Visual Studio Data Export Tool: Saving a Setting File

Screen capture for MySQL for Visual Studio Database Export Tool: Saving a Setting File

A saved setting file can be loaded into the MySQL Data Export tool by clicking the Load Settings button.

Figure 5.57 MySQL for Visual Studio Data Export Tool: Opening a Setting File

Screen capture for MySQL for Visual Studio Database Export Tool: Opening a Setting File