Home / Guides
Migration guide

MySQL to Aurora: Moving from RDS or Your Own Server

By · October 1, 2026 · 12 min read

The short version

For an RDS MySQL to Aurora migration, AWS gives you two physical paths: create an Aurora read replica of the RDS instance and promote it once replica lag is 0, or restore an RDS snapshot into a new Aurora MySQL cluster. From your own server, the options are a mysqldump import (logical, simplest) or a Percona XtraBackup copy restored from S3 (physical, faster on big databases), with binlog replication to close the gap before cutover. Either way, convert MyISAM tables to InnoDB first, since Aurora MySQL supports InnoDB tables only, and plan for stored code: in my test import, triggers failed with error 1419 until log_bin_trust_function_creators was set to 1.

Which path fits your source

AWS lays the options out in one table on its Aurora MySQL migration overview. Condensed:

Source Method Type Downtime
RDS for MySQL instance Aurora read replica, then promote Physical Writes stop only for the final catch-up
RDS for MySQL snapshot Migrate snapshot to a new cluster Physical Changes made after the snapshot are not in the new cluster
Your own server mysqldump into an existing cluster Logical Source frozen for dump plus load, unless you add binlog replication
Your own server Percona XtraBackup files in S3, restore to a new cluster Physical Short, with binlog replication for the tail

The same page sums up the tradeoff: physical migration "is faster than logical migration, especially for large databases", while logical migration lets you move a subset of tables and does not care about the physical storage layout. The physical route also has hard requirements on the source: default innodb_page_size (16KB) and a single ibdata1:12M:autoextend data file.

If you are still deciding between Aurora and staying on plain RDS, that comparison is its own guide: Aurora vs RDS: Which One to Migrate To.

RDS MySQL to Aurora migration with a read replica

This is the method AWS recommends for an RDS source. RDS takes a private snapshot of the instance, builds an Aurora cluster from it, then starts binlog replication from the RDS instance to the new cluster. The steps, from that page:

  1. In the console, select the MySQL instance and choose Create Aurora read replica. From the CLI it is aws rds create-db-cluster with --replication-source-identifier set to the source instance's ARN, followed by aws rds create-db-instance for the primary instance (the console creates that instance for you, the CLI does not).
  2. Wait. AWS says to expect "roughly several hours per tebibyte (TiB) of data".
  3. Stop writes on the RDS instance, then run SHOW REPLICA STATUS on the Aurora replica (Aurora MySQL version 3) until the lag reads 0.
  4. Run aws rds promote-read-replica-db-cluster, then point the application at the cluster endpoint.

The limits that catch people, all from the same page: one Aurora read replica per RDS instance; no Aurora read replica if the instance already feeds a cross-Region read replica; no unencrypted cluster from an encrypted instance; and no move to Aurora MySQL 3.05 or later from RDS for MySQL 8.0.11, 8.0.13 or 8.0.15, where AWS recommends upgrading to 8.0.28 first. Do not write to the replica before promotion: AWS warns that if those writes touch tables the source is still changing, replication can break and the replica has to be deleted and recreated.

The page also says that tables using other engines or the compressed row format slow down the replica build, and that converting them to InnoDB with dynamic row format beforehand speeds it up.

Migrating an RDS snapshot instead

The snapshot route is Migrate snapshot in the console or aws rds restore-db-cluster-from-snapshot --engine aurora-mysql from the CLI. It suits a maintenance window where the app can be down from snapshot to cutover. Two details from that page matter for sizing: Aurora uses extra space to convert MyISAM tables and to expand compressed tables, so AWS says to keep each MyISAM or compressed table under 8 TB, against 16 TB for other tables. And "Aurora MySQL supports InnoDB tables only", so MyISAM tables are converted during the migration; AWS suggests doing it yourself first with ALTER TABLE ... ENGINE=InnoDB, ALGORITHM=COPY, on a copy restored from a snapshot, not on production.

Which Aurora MySQL version should you migrate to?

Aurora MySQL version numbers map to community MySQL like this: version 2 is MySQL 5.7 compatible, version 3 is MySQL 8.0 compatible, and from 8.4 the Aurora version matches the MySQL version directly, so the engine version string looks like 8.4.mysql_aurora.8.4.7. On a running cluster, SELECT aurora_version(); tells you which one you are on.

Match the major version of your source. The physical S3 route does not allow backward migration for major or minor versions; AWS's example is that MySQL 8.0.32 cannot go to Aurora MySQL 3.03, which is compatible with 8.0.26. The same page lists only MySQL 5.7 and 8.0 as sources for that route.

When does Aurora MySQL reach end of life?

From the Aurora MySQL release calendar, as of October 2026:

Aurora major version MySQL compatibility End of standard support End of RDS Extended Support
Aurora MySQL version 2 5.7 31 October 2024 30 June 2029
Aurora MySQL version 3 8.0 30 April 2028 31 July 2029
Aurora MySQL version 8.4 8.4 April 2032 To be determined

Past the end of standard support, a version keeps running under RDS Extended Support "for a fee". Minor versions retire sooner: on the same calendar, 3.04 (LTS) ends standard support on October 31, 2026, while 3.10 (LTS) runs to April 30, 2028. A migration that lands on version 2 today lands on a paid version. A new migration should target 8.4 if your application has been tested on MySQL 8.4, otherwise a current 3.x.

Pre-migration checks I ran on the source

I built a small source database on MySQL 8.4.11 (the QA container I use for these guides) with the problems I usually find on old servers: a MyISAM log table, a table with no primary key, a latin1 table, a trigger and a stored function. Then I ran the checks I run before any MySQL move. @db holds the schema name so the output covers only that schema:

SET @db = 'mysql_to_aurora_src';

SELECT VERSION(), @@log_bin, @@binlog_format, @@gtid_mode, @@lower_case_table_names;

-- tables that are not InnoDB
SELECT table_schema, table_name, engine
FROM information_schema.tables
WHERE table_type = 'BASE TABLE' AND engine <> 'InnoDB' AND table_schema = @db;

-- tables without a primary key
SELECT t.table_schema, t.table_name
FROM information_schema.tables t
LEFT JOIN information_schema.table_constraints c
  ON c.table_schema = t.table_schema AND c.table_name = t.table_name
 AND c.constraint_type = 'PRIMARY KEY'
WHERE t.table_type = 'BASE TABLE' AND c.constraint_name IS NULL
  AND t.table_schema = @db;

-- stored code and its DEFINER
SELECT routine_schema AS db, routine_name AS name, routine_type AS type, definer
FROM information_schema.routines WHERE routine_schema = @db
UNION ALL
SELECT trigger_schema, trigger_name, 'TRIGGER', definer
FROM information_schema.triggers WHERE trigger_schema = @db;

The output, as it came:

+-----------+-----------+-----------------+-------------+--------------------------+
| VERSION() | @@log_bin | @@binlog_format | @@gtid_mode | @@lower_case_table_names |
+-----------+-----------+-----------------+-------------+--------------------------+
| 8.4.11    |         1 | ROW             | OFF         |                        0 |
+-----------+-----------+-----------------+-------------+--------------------------+
+---------------------+------------+--------+
| TABLE_SCHEMA        | TABLE_NAME | ENGINE |
+---------------------+------------+--------+
| mysql_to_aurora_src | audit_log  | MyISAM |
+---------------------+------------+--------+
+---------------------+--------------+
| TABLE_SCHEMA        | TABLE_NAME   |
+---------------------+--------------+
| mysql_to_aurora_src | audit_log    |
| mysql_to_aurora_src | legacy_rates |
+---------------------+--------------+
+---------------------+-------------+----------+---------+
| db                  | name        | type     | DEFINER |
+---------------------+-------------+----------+---------+
| mysql_to_aurora_src | net_amount  | FUNCTION | root@%  |
| mysql_to_aurora_src | invoices_bi | TRIGGER  | root@%  |
+---------------------+-------------+----------+---------+

What each line means for Aurora. lower_case_table_names matters because on Aurora MySQL version 3 it is set permanently when the cluster is created, so it has to be right in the parameter group before the first restore. The MyISAM table has to become InnoDB. Tables without a primary key load fine, but I give them one anyway: replication and later validation both get easier. The root@% definers are the next section.

AWS's own pre-check page adds two more queries worth running on a self-managed source: accounts holding SUPER, FILE, SHUTDOWN or CREATE TABLESPACE (those privileges are removed on a physical import) and objects whose definer is rdsadmin@localhost (not imported). The fix for my two tables:

--------------
ALTER TABLE mysql_to_aurora_src.audit_log ENGINE=InnoDB, ADD COLUMN id BIGINT AUTO_INCREMENT PRIMARY KEY FIRST
--------------

Query OK, 2 rows affected (0.011 sec)
Records: 2  Duplicates: 0  Warnings: 0

--------------
ALTER TABLE mysql_to_aurora_src.legacy_rates ADD PRIMARY KEY (code)
--------------

Query OK, 0 rows affected (0.017 sec)
Records: 0  Duplicates: 0  Warnings: 0

Self-managed MySQL to Aurora with mysqldump

For a server you run yourself, the AWS mysqldump page for Aurora points to the RDS import instructions. Their example command uses --single-transaction --compress --order-by-primary and sets --routines=0 --triggers=0 --events=0, with the advice to recreate stored code by hand afterwards. I wanted to see what happens if you do not, so I dumped with the routines and triggers included and loaded the file as an account without SUPER or SET_ANY_DEFINER, on a server with binary logging on:

Connection flags trimmed from the two commands; the output is as printed:

$ mysqldump -uroot --single-transaction --routines --triggers --events mysql_to_aurora_src > src.sql
$ mysql -um2a_admin mysql_to_aurora_dst < src.sql
--------------
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`%`*/ /*!50003 TRIGGER `invoices_bi` BEFORE INSERT ON `invoices` FOR EACH ROW SET NEW.amount = ROUND(NEW.amount, 2) */
--------------

ERROR 1419 (HY000) at line 119: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

Line 119 is the trigger. The MySQL manual explains it: with binary logging enabled, creating a stored function or trigger needs extra privilege unless log_bin_trust_function_creators is 1. Stripping the DEFINER clauses alone did not help; I got the same 1419 at the same line. With log_bin_trust_function_creators = 1 and the original dump, the error changed:

--------------
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`%`*/ /*!50003 TRIGGER `invoices_bi` BEFORE INSERT ON `invoices` FOR EACH ROW SET NEW.amount = ROUND(NEW.amount, 2) */
--------------

ERROR 1227 (42000) at line 119: Access denied; you need (at least one of) the SUPER or SET_ANY_DEFINER privilege(s) for this operation

With the variable at 1 and the definers stripped, the load went through (rc=0), and the trigger and function came out owned by the loading account, m2a_admin@%.

How this maps to Aurora, from AWS's master user privilege table: the Aurora MySQL version 3 master user gets SET_USER_ID and version 8.4 gets SET_ANY_DEFINER, and SUPER is not in either list. log_bin_trust_function_creators is a modifiable parameter in the Aurora parameter group, and per the MySQL manual it only matters while binary logging is on. My Aurora reading is from the docs, not from a run: I have no AWS account for these guides. What I can say from the run is that a dump of stored code needs both fixes ready, the definers and the variable, before cutover night.

Two more things about --single-transaction from the mysqldump manual: only InnoDB tables are dumped in a consistent state, and MyISAM tables "may still change state" during the dump. That is one more reason the MyISAM conversion goes before the dump. The mysqldump I used is the MariaDB 11.8 build that Homebrew installs; it worked against MySQL 8.4.11 for this schema, but for a production dump I would use the client that matches the server. More on flags in mysqldump Options for a Clean Migration.

Check the copy before cutover

After the second, clean load I compared the two sides with CHECKSUM TABLE:

+-------------------------------+------------+
| Table                         | Checksum   |
+-------------------------------+------------+
| mysql_to_aurora_src.audit_log | 1462033643 |
| mysql_to_aurora_dst.audit_log | 1462033643 |
| mysql_to_aurora_src.invoices  | 2158702675 |
| mysql_to_aurora_dst.invoices  | 2158702675 |
+-------------------------------+------------+

Matching values are good evidence, though the manual is clear that the checksum depends on the row format and is not guaranteed collision-free. It also takes a read lock while it runs, so on a big production table I run it against a replica or in a quiet window. A fuller approach, with row counts and per-column aggregates, is in How to Validate Data After a Migration.

Large self-managed databases: XtraBackup and binlog replication

When a dump takes too long, AWS's physical route restores a new cluster from Percona XtraBackup files in S3. From that page: Percona XtraBackup 2.4 for MySQL 5.7, 8.0 for MySQL 8.0; the bucket and cluster must be in the same Region; no partial backups (--tables, --databases and similar are rejected); restore only into a new cluster; and user accounts, functions, stored procedures and time zone information are not restored, so you script those separately.

To keep downtime short, AWS notes that you can set up replication between your MySQL database and an Aurora MySQL cluster to carry the changes made after the copy. The S3 page walks through it: a replication user with REPLICATION CLIENT and REPLICATION SLAVE, CALL mysql.rds_set_external_source(...) on Aurora MySQL version 3 with the binlog file and position (on the S3 route, from the restore event), CALL mysql.rds_start_replication;, and SHOW REPLICA STATUS until it has caught up. Then stop writes on the source, let the lag reach zero, stop replication and switch the application. The general pattern, and the traps in it, are in Zero Downtime Database Migration with CDC, and the full pre-flight list is in the Database Migration Checklist.

Sources