Migrate an on-premises MySQL database to Aurora MySQL
Created by Vinod Kumar Sadu (AWS) and Igor Obradovic (AWS)
Environment: Production | Source: On-premises MySQL database | Target: Amazon Aurora MySQL-Compatible Edition |
R Type: Replatform | Workload: Open-source | Technologies: Migration; Databases |
AWS services: AWS DMS |
Summary
This pattern explains how to migrate an on-premises MySQL source database to Amazon Aurora MySQL-Compatible Edition. It describes two options for migration: using AWS Database Migration Service (AWS DMS) or using native MySQL tools such as mysqldbcopy and mysqldump.
Prerequisites and limitations
Prerequisites
An active AWS account
A source MySQL database in an on-premises data center
Limitations
Database size limit: 64 TB
Product versions
MySQL versions 5.7 and 8.0. For the latest list of supported versions, see Amazon Aurora versions in the AWS documentation. If you're using AWS DMS, see also Using a MySQL-Compatible Database as a Target for AWS DMS for MySQL versions supported by AWS DMS.
Architecture
Source technology stack
An on-premises MySQL database
Target technology stack
Amazon Aurora MySQL-Compatible Edition
Target architecture
Data migration architecture
Using AWS DMS:
Using native MySQL tools:
Tools
AWS 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. We recommend that you use the latest version of AWS DMS for the most comprehensive version and feature support.
mysqldbcopy
is a MySQL utility that copies a MySQL database on a single server or between servers. mysqldump
is a MySQL utility that creates a dump file from a MySQL database for backup or migration purposes.
Epics
Task | Description | Skills required |
---|---|---|
Validate the source and target database version and engine. | DBA | |
Identify hardware requirements for the target server instance. | DBA, Systems administrator | |
Identify storage requirements (storage type and capacity). | DBA, Systems administrator | |
Choose proper instance type based on capacity, storage features, and network features. | DBA, Systems administrator | |
Identify the network access security requirements for source and target databases. | DBA, Systems administrator | |
Identify the application migration strategy. | DBA, App owner, Systems administrator |
Task | Description | Skills required |
---|---|---|
Create a virtual private cloud (VPC). | Systems administrator | |
Create security groups. | Systems administrator | |
Configure and start an Aurora MySQL-Compatible DB cluster. | Systems administrator |
Task | Description | Skills required |
---|---|---|
Use native MySQL tools or third-party tools to migrate database objects and data. | For instructions, see the documentation for MySQL tools such as mysqldbcopy | DBA |
Task | Description | Skills required |
---|---|---|
Migrate data with AWS DMS. | For instructions, see Using a MySQL-compatible database as a source and Using a MySQL-compatible database as a target in the AWS DMS documentation. | DBA |
Task | Description | Skills required |
---|---|---|
Follow the application migration strategy. | DBA, App owner, Systems administrator |
Task | Description | Skills required |
---|---|---|
Switch the application clients over to the new infrastructure. | DBA, App owner, Systems administrator |
Task | Description | Skills required |
---|---|---|
Shut down temporary AWS resources. | DBA, Systems administrator | |
Review and validate the project documents. | DBA, App owner, Systems administrator | |
Gather metrics around time to migrate, % of manual vs. tool, cost savings, etc. | DBA, App owner, Systems administrator | |
Close out the project and provide feedback. |
Related resources
References
Tutorials and videos