You can call the UpgradeDBInstanceEngineVersion operation to upgrade the major engine version of an ApsaraDB RDS for MySQL instance.

Note The fee that you must pay after the upgrade varies based on the instance types and storage types of the original instance and the new instance.

If the instance is a primary instance to which read-only instances or disaster recovery instances are attached, you must upgrade the major engine versions of the read-only instances or disaster recovery instances before you upgrade the major engine version of the primary instance.

Before you call this operation, make sure that the following requirements are met:

  • The original instance is in the Running state.
  • The instance runs one of the following database versions:
    • MySQL 5.7
    • MySQL 5.6
    • MySQL 5.5

You can call the UpgradeDBInstanceMajorVersion operation to upgrade the major engine version of an ApsaraDB RDS for PostgreSQL instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UpgradeDBInstanceEngineVersion

The operation that you want to perform. Set the value to UpgradeDBInstanceEngineVersion.

ClientToken String No ETnLKlblzczshOTUbOCzxxxxxxxxxx

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that the generated token is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length.

DBInstanceId String Yes rm-uf6wjk5xxxxxxx

The ID of the instance.

EngineVersion String Yes 5.7

The major engine version that the new instance runs. Valid values:

  • 8.0
  • 5.7
  • 5.6
EffectiveTime String No Immediate

The time when you want the change to take effect. Valid values:

  • Immediate: The change immediately takes effect.
  • MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.

Default value: Immediate.

Response parameters

Parameter Type Example Description
TaskId String 10254125

The ID of the task.

RequestId String 65BDA532-28AF-4122-AA39-B382721EEE64

The ID of the request.

Examples

Sample requests

http(s)://rds.aliyuncs.com/?Action=UpgradeDBInstanceEngineVersion
&DBInstanceId=rm-uf6wjk5xxxxxxx
&EngineVersion=5.7
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<?xml version="1.0" encoding="UTF-8" ?>
<UpgradeDBInstanceEngineVersionResponse>
	<RequestId> 65BDA532-28AF-4122-AA39-B382721EEE64</RequestId>
	<TaskId>10254125</TaskId></UpgradeDBInstanceEngineVersionResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : " 65BDA532-28AF-4122-AA39-B382721EEE64",
  "TaskId" : "10254125"
}

Error codes

HTTP status code Error code Error message Description
400 InvalidOrderTask.NotSupport The Current InstanceId exist Order Task in RDS. The error message returned because the instance has unfinished orders. Try again later.
400 InvalidSSLstatus Current DB instance has SSL enabled, this operation is not supported. The error message returned because the SSL encryption is enabled for the instance.
400 InvalidDBInstanceConnType.Format Specified DB instance conn type is not valid. The error message returned because the network type of the instance does not support this operation.
403 IncorrectDBInstanceState Current DB instance state does not support this operation. The error message returned because this operation is not supported when the instance is in the current state.
403 IncorrectEngineVersion The engine version does not support the operation. The error message returned because this operation is not supported for the database engine version that is run on the instance.
403 IncorrectEngineTypeMyisam Current DB instance has MyISAM table, and it does not support this operation. The error message returned because MyISAM tables exist in the instance.
403 InvalidInstanceLevel.Malformed Current DB instance level does not support this operation. The error message returned because the instance does not support this operation.
403 IncorrectDBInstanceLockMode Current DB instance lock mode does not support this operation. The error message returned because the instance is locked.
404 InvalidDBInstance.NotFound The specified instance does not exist or is not supported. The error message returned because the specified instance is not found. You must check the ID of the instance.

For a list of error codes, visit the Error Center.