How to Migrate an On-Premises MS SQL Database to Amazon Cloud


Learn how to install a MySQL database on Amazon AWS RDS and migrate a database from MSSQL to MySQL on the cloud.

Nowadays most companies are switching to cloud computing because of the many benefits it provides, like:

The most popular cloud database providers are Amazon Web Services RDS, Microsoft Azure, and Google Cloud.

Our tool, Data Loader, can be used to migrate or sync data from your on-premises local databases to the cloud without writing a single piece of code.

You Can Migrate

On-premises MS SQL, MySQL, Oracle, FoxPro, MS Access, or CSV to Amazon RDS MySQL, Amazon Aurora (MySQL compatible), Amazon MS SQL Server, Amazon Oracle, or Amazon MariaDB on the cloud.

Migrate databases to Amazon Cloud

In this article, we'll show you step by step how to create a new MySQL instance and database in Amazon AWS RDS, then load data from a local MS SQL database to a MySQL database hosted on Amazon Web Services (AWS).

Let's suppose we have a database called Northwind on our local MS SQL Server with 19 tables, and we want to transfer these tables to MySQL on Amazon AWS RDS.

Before you begin, you'll need an Amazon AWS account. If you don't have one, create a free trial account. Even for a free trial, Amazon will ask for a credit card for verification — it will charge and then reverse a small minimal amount for authentication.

Step-by-Step Walkthrough

1. Log in to the Amazon AWS Console

Fire up your browser and navigate to Amazon AWS, then log into your Amazon AWS RDS console.

AWS console

2. Open the RDS Section

Scroll down and click on RDS in the "Database" section.

Amazon AWS RDS

3. Open DB Instances

You'll reach the following screen. Click on DB Instances as shown below.

Amazon AWS DB instance

4. Create a Database

On the next screen, click the Create Database button in the top-right.

Create database in Amazon AWS RDS

5. Choose the Database Engine

Amazon AWS RDS will prompt you to choose a database engine: Amazon Aurora, MySQL, MariaDB, Oracle, MS SQL Server, or PostgreSQL. Since we want MySQL, select MySQL and click Next.

Amazon RDS available database engines

6. Enable the Free Tier (Optional)

You can check "Only enable options eligible for RDS Free Usage Tier" if you're using the free trial — this helps prevent unnecessary billing while you get acquainted with the managed database service.

New MySQL database in Amazon

7. Configure Database Settings

After clicking Next, you'll be prompted for several database settings. If Free Tier was selected, only Free Tier-eligible options are shown. Accept the defaults for MySQL license, MySQL version, DB instance class, and allocated storage type.

AWS MySQL database details

8. Set Instance Identifier, Username & Password

You just need to enter the DB Instance Identifier, Master Username, and Master Password. Remember these — you'll need them later to connect to this MySQL instance. Then click Next.

MySQL DB creation settings

9. Configure Advanced Settings

Clicking Next brings up the "Configure advanced settings" page. Accept all the default values.

Amazon AWS configure DB

10. Name the New Database

Scroll down and enter the name of the new MySQL database you want to create — we chose "db1", but you can choose whatever you like — then click "Create Database".

MySQL DB name

11. Wait for Creation to Complete

After clicking Create Database, you'll see a status screen while Amazon creates the new database instance.

New database creation

12. Find Your New MySQL Instance

After a while, click RDS → DB Instances in the AWS console and you'll find the new MySQL instance listed.

AWS MySQL instance

13. Get the Connection Endpoint

Click on the instance name to view its connection details. Here you'll find the Endpoint, Port, and Security Group — the Endpoint is the host address you'll use in Data Loader, and the default port is 3306.

MySQL database connect settings

14. Edit the Inbound Security Rule

By default, AWS only allows connections from your own IP address. To allow other IPs, click Security, then the Inbound tab, then Edit.

Inbound security rule

15. Allow Access From Anywhere

Edit the existing rule to allow connections from anywhere, then click Save. Your MySQL instance on Amazon Cloud is now ready to receive data.

Inbound rule edit

16. Start Data Loader and Select MSSQL as Source

With MySQL installed on the cloud, start Data Loader and select MS SQL Server as the source and MySQL as the target.

Data Loader to migrate data to cloud

17. Connect & Select Tables

Click Next; Data Loader will prompt you to connect to your MS SQL Server database — enter the hostname, username, and password, then click Connect. Once connected, select the desired database, then select the tables you want to migrate (here, all tables in the Northwind database).

Tables to migrate to Amazon RDS

18. Connect to the Target MySQL Database

Click Next and Data Loader will prompt you to connect to the target MySQL database. Enter the Endpoint noted earlier as the hostname, along with the Master Username and Password, then click Connect and select the "db1" database.

Connect to MySQL on cloud

19. Review Source and Target Tables

Data Loader shows the "Source and Destination Tables" screen where you can configure loading options via "Col Mapping" for each table — this is optional, so you can just click Next.

Source and target tables list

20. Save the Session

On the next screen, save the session and optionally specify an interval for scheduling. For this demo, just accept the defaults and click Next.

Save session in Data Loader

21. Start the Transfer

In the final screen, just press Start to begin the transfer. That's it!

Start transfer from MSSQL to MySQL on Amazon AWS RDS

That's it. Thanks for reading!

Download Data Loader Now!

More information on Data Loader.