ApsaraDB RDS allows you to upgrade the major engine version of an ApsaraDB RDS for MySQL instance in the ApsaraDB RDS console. You can also migrate the data of an ApsaraDB RDS for MySQL instance to a new RDS instance that uses the required major engine version to upgrade the major engine version. For example, you can migrate the data of an RDS instance for which the Transparent Data Encryption (TDE) feature is enabled.
Upgrade methods
- Upgrade the major engine version of an RDS instance in the ApsaraDB RDS console
- Upgrade the major engine version of an RDS instance in the Data Transmission Service (DTS) console
For more information about how to upgrade the major engine version of an RDS instance that runs a different database engine, see the following topics:
- Upgrade the major engine version of an ApsaraDB RDS for PostgreSQL instance
- Upgrade the RDS edition of an ApsaraDB RDS for SQL Server instance from Basic Edition to High-availability Edition
- Upgrade the major engine version of an ApsaraDB RDS for SQL Server instance with local SSDs from SQL Server 2008 R2 to SQL Server 2012 or 2016
- Upgrade the major engine version of an ApsaraDB RDS for SQL Server instance from SQL Server 2012 to SQL Server 2016
Upgrade the major engine version of an RDS instance in the ApsaraDB RDS console
DescriptionYou can perform the following upgrades in the ApsaraDB RDS console:
- Upgrade from MySQL 5.7 to MySQL 8.0
- Upgrade from MySQL 5.6 to MySQL 5.7
- Upgrade from MySQL 5.5 to MySQL 5.6
Category | Description |
---|---|
Instances | You can upgrade the major engine version of an RDS instance in the ApsaraDB RDS console only if the instance runs RDS High-availability Edition and uses local SSDs. |
If read-only RDS instances are attached to a primary RDS instance and the instance types of the read-only RDS instances are different, you cannot upgrade the major engine version of the primary RDS instance. We recommend that you release the read-only RDS instances, upgrade the major engine version of the primary RDS instance, and then re-create the read-only RDS instances. For more information, see Release or unsubscribe from an ApsaraDB RDS for MySQL instance and Create a read-only ApsaraDB RDS for MySQL instance. | |
Before you upgrade the major engine version of an RDS instance, make sure that the RDS instance is in the Running state. If the RDS instance is in a different state, such as Restarting or Creating Network Connection, you must wait until the running task is complete before you can upgrade the major engine version. | |
If an RDS instance runs RDS High-availability Edition, a major engine version upgrade is supported only when both the primary RDS instance and the secondary RDS instance run as expected and no replication latency exists between the primary RDS instance and the secondary RDS instance. You can check the Replication Thread Status of Secondary Instances and Replication Latency of Secondary Instances metrics on the Monitoring and Alerts page in the ApsaraDB RDS console. | |
Upgrades | You can upgrade the major engine version of an RDS instance only to the next major engine version. For example, if you want to upgrade MySQL 5.6 to MySQL 8.0, you must first upgrade MySQL 5.6 to MySQL 5.7 and then to MySQL 8.0. |
You cannot downgrade the major engine version of an RDS instance after the major engine
version is upgraded.
Note After you upgrade the major engine version of an RDS instance, you cannot use the
data backup files that are generated before the upgrade to restore the data of the
RDS instance. You can restore the data of the RDS instance only by using the data
backup files that are generated after the upgrade.
|
|
Encryption | If the SSL encryption feature is enabled for an RDS instance, you must disable the feature before you can upgrade the major engine version of the RDS instance. For more information, see Disable SSL encryption. |
If the Transparent Data Encryption (TDE) feature is enabled for an RDS instance, you cannot upgrade the major engine version of the RDS instance in the ApsaraDB RDS console. For more information, see Upgrade the major engine version of an RDS instance in the Data Transmission Service (DTS) console. | |
Database access | If an event is created in a database on an RDS instance that runs MySQL 5.7, you cannot upgrade the major engine version of the RDS instance from MySQL 5.7 to MySQL 8.0. You must delete the event, upgrade the major engine version, and then re-create the event. |
If a stored procedure, trigger, view, or function in a database involves features that are not supported by MySQL 8.0, the major engine version upgrade fails. For more information, see Changes in MySQL 8.0. | |
If more than 200,000 tables are created in databases on an RDS instance, the major engine version upgrade is not supported. You must delete the tables that you no longer require to ensure that the number of tables in the databases does not exceed 200,000 before a major engine version upgrade. | |
If the storage engine of an RDS instance is MyISAM, MEMORY, TokuDB, Sphinx, or RocksDB, you must change the storage engine of the RDS instance to InnoDB before a major engine version upgrade. | |
Instance types | If an RDS instance uses a phased-out instance type, you must upgrade the instance type of the RDS instance before you upgrade the major engine version of the RDS instance. For more information, see Primary ApsaraDB RDS for MySQL instance types and Change the specifications of an ApsaraDB RDS for MySQL instance. |
- Make sure that you understand the differences between the current major engine version and the major engine version to which you want to upgrade. We recommend that you create an RDS instance that runs the required engine version and test the syntax to ensure that the features and syntax that are used by your application are supported in the new major engine version. For example, you can create an RDS instance that runs MySQL 8.0. For more information about the differences between major engine versions, see the following topics:
- Before you upgrade the major engine version of your RDS instance, we recommend that you understand the benefits of the major engine version to which you want to upgrade. For more information, see Appendix 1: Advantages of MySQL 8.0 over MySQL 5.7 or Appendix 2: Advantages of MySQL 5.7 over MySQL 5.6.
- We recommend that you clone the original RDS instance before a major engine upgrade and use the cloned RDS instance to test whether the new major engine version is compatible with your workloads. Make sure that the cloned RDS instance runs as expected before you upgrade the major engine version of the original RDS instance.
- Before a major engine version upgrade, check whether a full data backup file is generated over the last seven days. If no full data backup files are generated over the last seven days, perform a full data backup.
- When you upgrade the major engine version of an RDS instance, transient connections may occur. We recommend that you upgrade the major engine version during off-peak hours or make sure that your application is configured to automatically reconnect to the RDS instance.
- Make sure that the amount of available storage is sufficient before a major engine version upgrade.
- We recommend that you modify the retention policies for binary log files. You can increase the retention period and maximum storage usage of binary log files. For more information, see Retain the backup files of an ApsaraDB RDS for MySQL instance for a long period of time.
Upgrade the major engine version of an RDS instance in the Data Transmission Service (DTS) console
If the major engine version of an RDS instance cannot be upgraded in the ApsaraDB RDS console, you can perform the following operations to upgrade the major engine version:
- Create an RDS instance that runs the new major engine version. For more information, see Create an ApsaraDB RDS for MySQL instance.
- Migrate the data of the original RDS instance to the new RDS instance. For more information, see Migrate data between ApsaraDB RDS for MySQL instances.
- Release the original RDS instance. For more information, see Release or unsubscribe from an ApsaraDB RDS for MySQL instance.
For example, if you want to upgrade the major engine version of an RDS instance that runs MySQL 5.7 and has TDE enabled to MySQL 8.0, you must first create an RDS instance that runs MySQL 8.0 and migrate the data of the original RDS instance to the new RDS instance. After you confirm that your workloads run as expected on the new RDS instance, you can release the original RDS instance.
Appendix 1: Advantages of MySQL 8.0 over MySQL 5.7
- The security of your database system is enhanced. You can manage accounts in a more flexible manner.
- You can create and manage resource groups.
- The features of the InnoDB storage engine are enhanced.
- New character sets, data types, and syntax are supported. Backup locks and optimizer_switch flags are introduced.
- JSON and XML expressions are enhanced.
- Optimizers are enhanced.
- Replication performance is enhanced.
- Multi-value indexes can be created. Derived condition pushdown is optimized.
- MySQL grant tables can be read.
- Resource allocation control is supported.
Appendix 2: Advantages of MySQL 5.7 over MySQL 5.6
- New features such as password management, account locking, and connection encryption are introduced. These new features help improve the security of your database system.
- Online DDL operations are supported. For example, you can use the RENAME INDEX clause to rename an index.
- The scalability of the InnoDB storage engine and the performance of temporary InnoDB tables are optimized to accelerate data loading.
- JSON expressions are supported.
- Index Condition Pushdown (ICP) is supported for partitioned tables, and spatial indexes are supported for InnoDB tables.
- Most of the used parsers, optimizers, and cost models are optimized to improve the maintainability, scalability, and performance of your database system.
- New character sets are supported. The character sets include the gb18030 character set that is defined in the Chinese National Standard GB 18030-2005: Information technology - Chinese coded character set.
- The ngram full-text parser plug-in is provided. The plug-in supports Chinese, Japanese, and Korean (CJK).
- Dump threads are optimized to reduce lock contention and increase throughput.
- The replication latency is significantly reduced.
- The sys system database is added to support multiple metrics. These metrics help reduce storage usage and simplify database management.
Appendix 3: Differences between MySQL 5.7 and MySQL 8.0
Feature | MySQL 5.7 | MySQL 8.0 |
---|---|---|
GRANT...IDENTIFIED BY PASSWORD | Supported | Not supported |
PASSWORD() function | Supported | Not supported |
FLUSH QUERY CACHE and RESET QUERY CACHE | Supported | Not supported |
Parameters for the SQL_MODE system variable: DB2, MAXDB, MSSQL, MYSQL323, MYSQL40, ORACLE, POSTGRESQL, NO_FIELD_OPTIONS, NO_KEY_OPTIONS, NO_TABLE_OPTIONS | Supported | Not supported |
GROUP BY for automatic sorting | Supported | Not supported |
Syntax that contains the EXTENDED or PARTITIONS keyword | Supported | Not supported |
Encryption functions such as ENCODE(), DECODE(), and ENCRYPT() | Supported | Not supported |
Functions related to spatial analysis For more information, see Open source MySQL documentation. | Supported | Not supported |
Functions that previously accepted either well-known binary (WKB) strings or geometry arguments but no longer accept geometry arguments | Supported | Not supported |
Resolution of \N to NULL | Supported | Not supported |
PROCEDURE ANALYSE() function | Supported | Not supported |
Creation of partitioned tables by using the NDB storage engine | Supported | Not supported |
Compression of temporary tables by using the InnoDB storage engine | Supported | Not supported |
JSON_APPEND() function | Supported | Not supported |
Placing of table partitions in shared tablespaces | Supported | Not supported |
ALTER TABLE...UPGRADE PARTITIONING | Supported | Not supported |
Appendix 4: Differences between MySQL 5.6 and MySQL 5.7
Feature | 5.6 | MySQL 5.7 |
---|---|---|
CREATE...AS SELECT in global transaction identifier (GTID) mode | Supported | Not supported |
Usage of temporary tables when the GTIDs feature is enabled | Supported | Not supported |
Configuration of partition keys in partitioned tables | Supported | Not supported |
ENGINE_NO_CACHE | Supported | Not supported |
Invisible indexes | Supported | Not supported |
UPDATE non_affected_rows INSERT | Supported | Not supported |
Proxy-related commands | Supported in SET command mode | Supported in Call Procedure mode |
TokuDB, Sphinx, RocksDB, and MEMORY storage engines | Supported | Not supported |
str_ord() function | Supported | Not supported |
raiseerror() function | Supported | Not supported |
OPTIMIZE TABLE table ASYNC | Supported | Not supported |
ENGINE_NO_CACHE | Supported | Not supported |
INFORMATION.TABLE_UTILIZATION table | Supported | Not supported |
The requesting_thd_id and blocking_thd_id columns of the INFORMATION_SCHEMA.INNODB_LOCK_WAITS table | Supported | Not supported |
INFORMATION_SCHEMA.INNODB_RSEG table | Supported | Not supported |
INFORMATION_SCHEMA.INNODB_IO_STATUS table | Supported | Not supported |
Column compression | Supported | Not supported |
Query Plan Cache | Supported | Not supported |
Limit and Union syntax | Parentheses () not required | Parentheses () required |
SHOW FULL PROCESSLIST | The memory and query_memory columns are removed from the results that are returned by the SHOW FULL PROCESSLIST statement in MySQL 5.7. | |
max_statement_time and max_execution_time | The max_statement_time parameter is removed from MySQL 5.7. The max_execution_time parameter is retained in MySQL 5.7. | |
RDS_SQL_MAX_AFFECTED | The number of rows on which the UPDATE or DELETE statement is executed can no longer be specified by the RDS_SQL_MAX_AFFECTED variable in MySQL 5.7. The number of rows is specified by the rds_sql_max_affected_rows variable. | |
Performance optimization and adjustment for concurrency control | The following parameters can no longer be used for concurrency control in MySQL 5.7:
|
|
Variables used to specify the number of connections | The following variables are deleted from MySQL 5.7:
|
|
Replication-related adjustments |
|
|
Log-related adjustments | The following adjustments are made to error logs in MySQL 5.7:
|
FAQ
- Why does a transient connection occur when I upgrade the major engine version of an
RDS instance? Does the upgrade cause other serious risks?
To ensure service stability, ApsaraDB RDS upgrades the major engine version of the secondary RDS instances. Then, ApsaraDB RDS switches your workloads to the secondary RDS instance before it upgrades the major engine version of the primary RDS instance. During the switchover, a transient connection occurs. The major engine upgrade does not cause other serious risks.
- Does ApsaraDB RDS upgrade the major engine version of the primary RDS instance and
the secondary RDS instance at the same time?
No, ApsaraDB RDS first upgrades the major engine version of the secondary RDS instance, switches your workloads to the secondary RDS instance, and then upgrades the major engine versions of the primary RDS instance.
- Why am I unable to find the entry point to upgrade the major engine version of my
RDS instance that runs RDS Basic Edition in the ApsaraDB RDS console? How do I upgrade
the major engine version of the RDS instance?
You cannot directly upgrade the major engine version of an RDS instance that runs RDS Basic Edition. Therefore, you cannot find the upgrade entry point in the ApsaraDB RDS console. In this case, you need to upgrade your RDS instance from RDS Basic Edition to RDS High-availability Edition and then upgrade the major engine version of your RDS instance. For more information, see Upgrade an ApsaraDB RDS for MySQL instance from Basic Edition to High-availability Edition and Upgrade the major engine version of an RDS instance in the ApsaraDB RDS console.Note
- You can upgrade the major engine versions only of RDS instances that run RDS High-availability Edition and use local SSDs in the ApsaraDB RDS console.
- When you upgrade an RDS instance that runs MySQL 5.7 and uses standard SSDs from RDS Basic Edition to RDS High-availability Edition, you can change the storage type of the instance from standard SSD to local SSD.
Related operations
Operation | Overview |
---|---|
Upgrade the major engine version of an ApsaraDB RDS for MySQL instance | Upgrades the major engine version of an ApsaraDB RDS instance. |