RDS for MySQL supports upgrading the major version of an instance, allowing you to upgrade eligible MySQL 5.7 instances to MySQL 8.0. This topic describes the procedure for upgrading database major version of the instance.
Background
The major version upgrade feature of RDS for MySQL allows you to upgrade eligible MySQL 5.7 instances to MySQL 8.0. You can upgrade the major version of an instance immediately, during the maintenance window, or during a specific time period. RDS for MySQL also provides observation capabilities for upgrades, providing temporary read-only endpoints to eligible instances for testing and verification. RDS for MySQL will create a temporary read-only endpoint for the instance. You can use this temporary read-only endpoint to verify the business impact of the major version upgrade. If the verification is successful, you can continue the upgrade task in the Task Center. If the verification results are not as expected, you can cancel the upgrade and roll back the instance.
During the upgrade, you can perform normal read‑and‑write operations, and data will be written to the RDS for MySQL 5.7 instance at this time. After the full‑volume data (data existing before the upgrade) in the RDS for MySQL 5.7 instance is migrated, incremental Binlog (incremental data, namely the data written to RDS for MySQL 5.7 during the upgrade) will be synchronized. The switch operation is performed after the data is fully caught up.
After you initiate a major version upgrade task for an instance, you can view the specific progress of the instance upgrade in the Task Center. The instance major version upgrade task includes the following seven stages. After completing phases such as task initialization, resource processing, data processing, and data catch-up, the instance switches to the target version. The task then enters the 'Waiting to continue' phase (task status: Waiting for execution), while the instance status remains 'Upgrading'. During this period, you can select "Cancel" to roll back the upgrade or "Execute now" to complete it. The duration of the "Waiting to continue" phase is the configured observation duration. If the "Waiting for execution" state lasts longer than the observation duration, the system automatically completes the upgrade.
tip
- The 'Waiting for switch time' and 'Continue task' phases exist only if you select to upgrade during a maintenance window or a specific time period.
- During the 'Waiting for switch time' phase, you can use the temporary domain name (i.e., the domain name of the temporary terminal, which will have a Temporary label) to connect to the backend of the instance to be switched for read-only testing. The username and password are the same as those of the current instance. The temporary domain name will be automatically removed after the switch is completed.
Precautions
- There will be a flash disconnection of seconds during the upgrade switching phase. It is recommended to switch during the maintainable time period or during the business off-peak period and add an application reconnection mechanism to significantly reduce the impact of database connection flash disconnection on the business.
- During the upgrade process, do not create accounts, delete tables, or perform DDL operations. These operations may cause abnormalities in the replication link, which can result in a failed upgrade.
- When upgrading the major version of a database instance, a temporary read-only endpoint is created for testing and verification. If the database proxy is enabled for the instance before the upgrade, a temporary read-only proxy endpoint and a temporary read-only direct endpoint will be created for the instance during the upgrade process; if the database proxy function is not enabled for the instance, only a temporary read-only direct endpoint will be created for the instance during the upgrade process. For more information about connection endpoints, refer to Viewing connection endpoints.
tip
In the Endpoints list of the instance, the Endpoint name/ID column of the temporary endpoint will have a Temporary tag.
- Before entering the Waiting for task to continue stage, the backend has completed the preparatory work for the upgrade and switched the traffic. If features specific to MySQL 8.0 are applied to the instance at this point, canceling the upgrade task will fail.
- Upgrading the database major version for instances that use the RocksDB engine is not currently supported.
- Do not execute DDL statements during the upgrade to prevent replication interruptions between the primary and readonly instances due to version differences.
- After the instance completes the database kernel major version upgrade, once the configured observation duration is exceeded, rollback to the original pre‑upgrade version and downgrade to a lower database version are no longer supported.
- During the upgrade, you can perform normal read‑and‑write operations, and data will be written to the RDS for MySQL 5.7 instance at this time. After the full‑volume data (data existing before the upgrade) in the RDS for MySQL 5.7 instance is migrated, incremental Binlog (incremental data, namely the data written to RDS for MySQL 5.7 during the upgrade) will be synchronized. The switch operation is performed after the data is fully caught up.
Constraints and limits
- You can only upgrade MySQL 5.7 instances to MySQL 8.0. You cannot upgrade MySQL 5.7 or MySQL 8.0 instances to MySQL 8.4.
- When upgrading an instance, ensure that the instance state is Running.
- If the instance has a disaster recovery instance, you need to delete the disaster recovery instance first, and then rebuild it after upgrading the primary instance.
- Before upgrading, RDS for MySQL performs a pre-check on the target instance. The pre-check includes check items from the native MySQL Upgrade Checker Utility and custom check items from RDS for MySQL. The check item results are categorized as Failed, Warning, and Note. You cannot upgrade the instance if there are failed check items. If there are check items with a Warning or Note result, you must fix them and run the pre-check again, or ignore them before you can upgrade the instance. For details about the pre-check items, refer to Check items list.
- In the upper-left corner of the top menu bar, select the project and region for the instance.
tip
If the project of the instance has not been set, the project should be selected as All resources.
- On the Instances page, click the target instance name.
- On the Summary tab, in the Configuration information section, point to Upgrade version to the right of Database version. In the pop-up window, click Upgrade major version.
- On the Upgrade major version page, modify or confirm the following configurations, and then click Upgrade pre-check.
tip
The time required to pre-check depends on the number of databases & tables of the instance. If the number of databases & tables under the instance is large, it may take more time to complete the pre-check. Closing or refreshing the page will not interrupt the pre-check process, and the background will continue. You can revisit the pre-check page later or check the completion of the pre-check in the Task center.
- After completing the pre-check, complete the following configurations on the Upgrade major version page and click Upgrade.
tip
- After the upgrade starts, the Upgrade major version page will be closed, and the instance status will switch to Upgrading. You can check the detailed progress of the upgrade task in the Task center.
- If you choose to upgrade during the maintenance window or a specific time period, the instance upgrade task will have a Waiting for switch time phase. During this phase, you can:
- Verify the business impact of the major version upgrade through the temporary read-only endpoint.
- In the Task center, choose to execute the upgrade task immediately, modify the task's switch time, or cancel the task.
- After the instance switches to the target version, the task enters the Waiting for execution state, and the instance status becomes Upgrading. The instance will then enter the observation phase. During this period, you can select Cancel in the Task center to roll back the upgrade or Execute now to complete it. If the Waiting for execution state lasts longer than the set observation duration, the system automatically completes the upgrade.