Performing Data Downloads using MySQL Workbench with AWS
Data downloads normally occur when you want to create a local copy of the data that you’ve worked with in the AWS cloud. There are all kinds of reasons to perform this task, with backup and application performance forming the two most common needs. Normally, the data download goes into a read-only database because you don’t want any local changes to the data. Otherwise, you might find yourself in the untenable position of having to referee local changes against those made by other people in the cloud (a situation that usually results in some level of data loss). This information helps you perform a data download using MySQL Workbench.
As with data uploads, you can perform data downloads that provide you with a complete, replicated copy of your MySQL database. This process can be long and a bit complicated, which is why you should avoid using it when possible. The AWS page details this longer process. Most developers, however, are more interested in actual data.
Before you begin this process, make sure you have a local copy of MySQL Workbench installed and configured to access your MySQL database on RDS. These steps help you create a local or network copy of your database.
- Open MySQL Workbench and connect to RDS.
You see the connection open as normal.
- Choose Server → Data Export.
You see the Data Export page open.
- Select a list of schemas you want to export.
The example assumes that you choose FirstDatabase. However, you can export any (or all) of the schemas in the list.
- Click the schema and select all the schema entry objects you want to export.
The example has only MyTable to select.
- Select all the objects you want to export.
The example exports all stored procedures and functions, events, and triggers.
- Choose Export to Dump Project Folder and type a location for the folder.
A dump project folder contains a series of scripts designed to recreate the database and all its objects.
- Select Include Create Schema.
Selecting this option enables you to easily recreate the database structure in a local copy of MySQL.
- Click Start Export.
For a really small setup such as FirstDatabase, the process happens within a second or two.