Why now
Aurora MySQL version 2, compatible with MySQL 5.7, reached the end of standard support on 31 October 2024. Clusters still on it were automatically enrolled in RDS Extended Support, a paid service that runs until February 2027. Every month on version 2 now costs more, and the deadline doesn’t move.
Anwar has migrated databases from MySQL to Amazon Aurora, and upgraded to Aurora MySQL version 3. This is the process in outline.
Find the incompatibilities first
Aurora runs mandatory compatibility checks before a major upgrade. If any check reports an error, the upgrade is cancelled before the database goes offline, and the details are written to the upgrade-prechecks.log file. Find these issues on a copy, not on the day.
The most common problems:
- New reserved words. Names such as tables, columns or routine variables that MySQL 8.0 now reserves must be quoted or renamed.
- Removed syntax and features. For example
SQL_CACHEandSQL_NO_CACHEin views and routines, andASCorDESConGROUP BY. - Zero dates.
0000-00-00date, datetime and timestamp values. - Character sets.
utf8is an alias for the deprecatedutf8mb3. Plan a move toutf8mb4. - Definers and names. Triggers and events with missing definers, and mixed-case names when
lower_case_table_namesis set.
Choosing an upgrade method
| Method | Downtime | Best when |
|---|---|---|
| Blue/Green Deployment | A switchover, typically under a minute | Production, where downtime matters. A green copy is upgraded and kept in sync, then swapped in. |
| In-place upgrade | The cluster is offline during the upgrade | Smaller databases, or where a maintenance window is acceptable |
| Snapshot restore to a new cluster | Depends on how you cut over | Testing, or when you want a clean new cluster |
The plan, step by step
- Clone the cluster and upgrade the clone. The prechecks run against your real schema and data.
- Fix every error in
upgrade-prechecks.log, and review the warnings and notices. - Test the application against the upgraded clone, including stored procedures, reports and anything that uses unusual SQL.
- Check parameter groups. Version 3 needs its own cluster and instance parameter groups. Recreate any custom settings.
- Upgrade production with a Blue/Green Deployment, during a quiet period, with a rollback plan agreed in advance.
- Watch it after the switchover: slow queries, error rates and replication lag.
The prechecks themselves use CPU and memory, and can be slow on a cluster with many objects. Running them on a clone or the green environment keeps that load off production.
Sources
- AWS: Preparing for Aurora MySQL version 2 end of standard support
- AWS: Major version upgrade prechecks for Aurora MySQL
- AWS: Aurora Blue/Green Deployments
See also AWS consulting.
Next step
Planning a database upgrade?
On a 30-minute call we’ll look at your cluster and the safest path to version 3.