I have an Amazon Aurora MySQL-compatible DB cluster that runs on version 2.x. I want to upgrade to Aurora MySQL-compatible version 3.x.
Short description
Note: Amazon Aurora versions 2.x are MySQL 5.7 compatible and Amazon Aurora versions 3.x are MySQL 8.0 compatible.
To upgrade your Amazon Aurora MySQL DB cluster from version 2.x to version 3.x, choose one of the following methods:
- Create a blue/green deployment, and then switch over
- Perform an in-place upgrade of your Aurora MySQL cluster
- Take a snapshot of your DB cluster and then restore it to Aurora MySQL 3.x
Note: The upgrade process from version 2.x to version 3.x can take substantial time. Downtime varies depending on the method that you use.
Resolution
Note: It's a best practice to test the upgrade in a non-production environment before you upgrade your production database. To upgrade a non-production DB cluster, first create a clone of your production database. Then, perform the upgrade on the clone.
Create a blue/green deployment
To upgrade your database with no downtime, create a blue/green deployment to replicate data from the version 2.x cluster to the version 3.x cluster. The blue/green deployment runs both the old and new clusters at the same time during replication. When replication is complete, the new upgraded cluster takes over. For more information, see Using Amazon RDS blue/green deployments for database updates.
Perform an in-place upgrade
Note: Before you perform an in-place upgrade, see How the Aurora MySQL in-place major version upgrade works. For more information on how to plan and test your in-place upgrade, see Planning a major version upgrade for an Aurora MySQL cluster.
To perform an in-place database upgrade, complete the following steps:
- Sign in to the Amazon RDS console.
- If you used a custom parameter group for the version 2.x cluster, then create a corresponding parameter group that's compatible with the version 3.x cluster. Make the necessary adjustments to the configuration parameters in that new parameter group. For more information, see How in-place upgrades affect the parameter groups for a cluster.
- In the navigation pane, choose Databases.
- In the list, choose the DB cluster that you want to modify.
- Choose Modify.
- For Version, choose a new Aurora MySQL 3.x version.
- Choose Continue.
- On the next page, specify when to perform the upgrade. Choose During the next scheduled maintenance window or Immediately.
- (Optional) To monitor the progress of your upgrade and identify potential issues, periodically examine the Events page in the Amazon RDS console during the upgrade. If the upgrade encounters any issues, then see Troubleshooting for Aurora MySQL in-place upgrade.
- If you created a new parameter group at the start of this procedure, then associate the custom parameter group with your upgraded cluster.
Create a snapshot and restore it to the new version
To upgrade from Aurora MySQL 2.x to Aurora MySQL 3.x with a snapshot restore, complete the following steps:
- Sign in to the Amazon RDS console.
- From the navigation pane, choose Databases, and then choose your Aurora 2.x DB cluster.
- Choose Actions, and then choose Take Snapshot.
- From the navigation panel, choose Snapshots.
- After the snapshot of the DB cluster is created, choose the snapshot and then choose Actions.
- Choose Restore Snapshot.
- In the Instance Specification section, for DB Engine Version, choose one of the Aurora 3.X (compatible with MySQL 8.0.23) versions available.
- Enter the configuration details, and then choose Restore DB Instance.
After the Aurora 3.x cluster becomes available, you can redirect connections to the new DB instance.
Note: If you use a snapshot to upgrade your database, and your database supports a live application, then stop the application before you take the snapshot. This makes sure that you don't lose recent changes to your data. Downtime occurs from the time that the snapshot creation starts until the new database is created and enters a running state.
Related information
Upgrading the major version of an Aurora MySQL DB cluster
Creating an Amazon Aurora clone
Creating a DB cluster snapshot
Restoring from a DB cluster snapshot