Select the right tools for migration to Azure Database for MySQL

APPLIES TO: Azure Database for MySQL - Single Server Azure Database for MySQL - Flexible Server

Overview

Migrations are multi-step projects that are tough to pull off. Migrating database servers across platforms involves more than data and schema migration. There are also several other components, such as server configuration parameters, networking, access control rules, etc., to move. These are required to ensure that the functionality of the database server in the new target platform mimics the source.

For detailed information and use cases about migrating databases to Azure Database for MySQL, you can refer to the Database Migration Guide. This document provides pointers that will help you successfully plan and execute a MySQL migration to Azure.

In general, migrations can be categorized as either offline or online.

  • With an offline migration, the source server is taken offline and a dump and restore of the databases is performed on the target server.

  • With an online migration (migration with minimal downtime), the source server allows updates, and the migration solution will take care of replicating the ongoing changes between the source and target server along with the initial dump and restore on the target.

If your application can afford some downtime, offline migrations are always the preferred choice, as they are simple and easy to execute. However, if your application can only afford minimal downtime, an online migration is the best choice. Migrations of the majority of OLTP systems, such as payment processing and e-commerce, fall into this category.

Decision table

To help you with selecting the right tools for migrating to Azure Database for MySQL, consider the detail in the following table.

Scenarios Recommended Tools Links
Offline Migrations to move databases >= 1 TB Dump and Restore using MyDumper/MyLoader + High Compute VM Migrate large databases to Azure Database for MySQL using mydumper/myloader

Best Practices for migrating large databases to Azure Database for MySQL
Offline Migrations to move databases < 1TB If network bandwidth between source and target is good (e.g: Highspeed express route), use Azure DMS (database migration service)

-OR-

If you have low network bandwidth between source and Azure, use Mydumper/Myloader + High compute VM to take advantage of compression settings to efficiently move data over low speed networks

-OR-

Use mysqldump and MySQL Workbench Export/Import utility to perform offline migrations for smaller databases.
Tutorial: Migrate MySQL to Azure Database for MySQL offline using DMS - Azure Database Migration Service

Migrate Amazon RDS for MySQL to Azure Database for MySQL using MySQL Workbench

Import and export - Azure Database for MySQL
Online Migration Mydumper/Myloader with Data-in replication

Mysqldump with data-in replication can be considered for small databases( less than 100GB). These methods are applicable to both external and intra-platform migrations.
Configure Data-in replication - Azure Database for MySQL Flexible Server

Tutorial: Migrate Azure Database for MySQL – Single Server to Azure Database for MySQL – Flexible Server with minimal downtime
Single to Flexible Server Migrations Offline: Custom shell script hosted in GitHub This script also moves other server components such as security settings and server parameter configurations.

Online: Mydumper/Myloader with Data-in replication
Migrate from Azure Database for MySQL - Single Server to Flexible Server in 5 easy steps!

Tutorial: Migrate Azure Database for MySQL – Single Server to Azure Database for MySQL – Flexible Server with minimal downtime

Next steps