Help Center/ Relational Database Service/ User Guide/ Working with RDS for MySQL/ Version Upgrade/ Upgrading an RDS for MySQL Instance from 5.6 to 5.7
Updated on 2024-10-14 GMT+08:00

Upgrading an RDS for MySQL Instance from 5.6 to 5.7

Scenarios

You can upgrade your RDS for MySQL instance from 5.6 to 5.7 using either of the following methods:

Precautions

  • You are advised to perform a full backup before upgrading a major version.

    Upgrading a major version will cause a connection interruption for 10 to 120 seconds. Ensure that your applications support automatic reconnection. Perform this operation during off-peak hours because upgrading a major version during peak hours takes much more time.

  • When you upgrade the major version of a primary DB instance, the major versions of its read replicas (if any) will also be upgraded. You cannot upgrade the major version of a read replica without upgrading that of the primary instance.
  • A major version upgrade cannot be rolled back after the upgrade is complete.
  • Before the upgrade, compare the old and new versions carefully. To ensure that the syntax and features of the old version used by your applications are compatible with the new version, create a new RDS for MySQL 5.7 instance to test the syntax before the upgrade.
  • You are advised to clone the original instance and use the cloned instance to perform an upgrade check. After confirming that all functions are normal, upgrade the original instance.
  • Sufficient storage needs to be reserved to ensure data writes during the upgrade.
  • Scheduled major version upgrades need to be prepared in advance and cannot be canceled.
  • After a major version upgrade is complete, the backups before the upgrade cannot be used for the instance of the new version, and the time points before the upgrade cannot be selected for point-in-time recovery (PITR).
  • DDL operations on events, such as CREATE EVENT, DROP EVENT, and ALTER EVENT, are not allowed during a major version upgrade.
  • After a major version upgrade, specification parameters are reset to the default values of the new version, including threadpool_size, innodb_buffer_pool_size, innodb_io_capacity, innodb_io_capacity_max, innodb_buffer_pool_instances, back_log, and max_connections.

Constraints

  • If the replication delay between primary and standby instances is longer than 300 seconds, the major version cannot be upgraded.
  • The major version cannot be upgraded for DB instances with abnormal nodes.
  • RDS for MySQL 5.7 and later versions no longer support Sequence Engine.
  • RDS for MySQL DB instances support a maximum of 500,000 tables. If the number of tables is greater than 500,000, the major version upgrade may fail.
  • RDS for MySQL DB instances with event scheduler enabled do not support major version upgrades. If you want to perform a major version upgrade, disable event scheduler first. For details, see Enabling or Disabling Event Scheduler.

Upgrading a Major Version on the RDS Console

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  4. On the Instances page, click the instance name to go to the Overview page.
  5. Under DB Engine Version, click Upgrade Engine Version.
  6. In the displayed dialog box, select a scheduled time and click OK.

    • Upon submission: The system upgrades your instance to the latest version of 5.7 immediately after you submit the upgrade request.
    • In maintenance window: The system will upgrade your instance to the latest version of 5.7 during the maintenance window you specified. For details about how to configure a maintenance window, see Changing the Maintenance Window.
    Figure 1 Selecting a scheduled time

Upgrading a Major Version Using DRS

You can migrate data from an RDS for MySQL 5.6 instance to an RDS for MySQL 5.7 instance using Data Replication Service (DRS). Before the migration, create a DB instance of the target version.

On the Instances page, click the instance you want to migrate. On the displayed Overview page, click Migrate Database in the upper right corner.

For more information, see Creating a Migration Task in the Data Replication Service User Guide.

Table 1 MySQL database version information

Source Database Version

Destination Database Version

Migration Type

RDS for MySQL/Self-managed MySQL/MySQL in other clouds

  • 5.5.x
  • 5.6.x
  • 5.7.x
  • 8.0.x

RDS for MySQL

  • 5.6.x
  • 5.7.x
  • 8.0.x

Version upgrade

DRS supports migration only from an earlier version to a later version.