AWS Prescriptive Guidance
Patterns

Migrate an on-premises MySQL database to Amazon RDS for MySQL

R Type :RePlatform

source :Databases: Relational

target :Amazon RDS (MySQL)

tags :mysql, database, amazon rds (mysql)

Summary

This pattern provides guidance for migrating an on-premises MySQL database to Amazon Relational Database Service (Amazon RDS) for MySQL. The pattern discusses the use of AWS Database Migration Service (AWS DMS) or native MySQL tools for the migration.

Assumptions and Prerequisites

Prerequisites

  • An active AWS account

  • A MySQL source database in an on-premises data center

Limitations

  • Database size limit: 16 TB

Product versions

  • MySQL versions 5.5, 5.6, and 5.7  

Architecture

Source technology stack

  • An on-premises MySQL database

Target technology stack

  • An Amazon RDS DB instance running MySQL

Data migration methods

  • AWS DMS

  • Native MySQL tools (mysqldbcopy, mysqldump)

Target architecture

AWS data migration architecture

Using AWS DMS: 

Using native MySQL tools:

Tools Used

AWS DMSAWS Database Migration Service (AWS DMS) supports several source and target databases. For information about MySQL source and target databases supported by AWS DMS, see Migrating MySQL-Compatible Databases to AWS. If your source database isn't supported by AWS DMS, you must choose another method to migrate your data.

Epics

Plan the migration

Tasks

Title Description Skills Predecessor
Validate the source and target database versions. DBA
Identify the hardware requirements for the target server. DBA, SysAdmin
Identify the storage requirements (storage type and capacity). DBA, SysAdmin Migration analysis - Validate source and target database versions
Choose the proper instance type based on capacity, storage features, and network features. DBA, SysAdmin
Identify the network access security requirements for source and target databases. DBA, SysAdmin
Identify the application migration strategy. DBA, SysAdmin, AppOwner

Configure the infrastructure

Tasks

Title Description Skills Predecessor
Create a virtual private cloud (VPC). SysAdmin
Create security groups. SysAdmin
Configure and start an Amazon RDS DB instance running MySQL. For instructions, see https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateInstance.html. SysAdmin

Migrate data - option 1

Tasks

Title Description Skills Predecessor
Use native MySQL tools or third-party tools to migrate database objects and data. DBA

Migrate data - option 2

Tasks

Title Description Skills Predecessor
Migrate data with AWS DMS. DBA

Migrate the application

Tasks

Title Description Skills Predecessor
Follow the application migration strategy. DBA, SysAdmin, AppOwner

Cut over

Tasks

Title Description Skills Predecessor
Switch the application clients over to the new infrastructure. DBA, SysAdmin, AppOwner

Close the project

Tasks

Title Description Skills Predecessor
Shut down the temporary AWS resources. DBA, SysAdmin
Review and validate the project documents. DBA, SysAdmin, AppOwner
Gather metrics around time to migrate, % of manual vs. tool, cost savings, etc. DBA, SysAdmin, AppOwner
Close out the project and provide feedback. DBA, SysAdmin, AppOwner

References and Help

References

Tutorials and videos

Contact and help

Pattern Library Support: aws-mpl@amazon.commailto:aws-mpl@amazon.com