You need to enable JavaScript to run this app.
RDS for MySQL

RDS for MySQL

Copy page
Download PDF
Managing tasks
DescribeTaskDetail
Copy page
Download PDF
DescribeTaskDetail

Call the DescribeTaskDetail interface to query task details.

Request type

Synchronous request.

Request parameters

Name
Type
Required
Example
Description
TaskId
String
Yes
6f415b1c8f394b0eaad4ea5f1439****
Task ID.
ProjectName
String
No
default
Project name.
InstanceId
String
No
mysql-a63c49e8****
Instance ID.

Response parameters

Name
Type
Example
Description
TaskInfo
Object
Please refer to the return example.
Detailed information about the task.
CostTimeMS
Long
3391
Task duration. The unit is milliseconds.
CreateTime
String
2024-01-29T13:13:49.955Z
The creation time of the task.
FinishTime
String
2024-01-29T12:38:29.116Z
The completion time of the task.
Progress
Integer
45

Task progress. The unit is percentage.

tip

Only tasks with the task status of In Progress, i.e., tasks where the value of TaskStatus is Running, will return the task progress.

RelatedInstanceInfos
Object
{ "InstanceID": "mysql-5bde124c****" }
Instances related to the task.
InstanceID
String
mysql-d4942fd7****
Instance ID.
ScheduledExecuteEndTime
String
2024-12-20T17:59:00Z

The deadline for starting the plan. The time format is yyyy-MM-ddTHH:mm:ssZ (UTC time).

tip

This field will only be returned for tasks in the "Waiting to start", "Waiting to execute", or "Waiting to switch" states.

ScheduledExecuteStartTime
String
2024-12-20T16:00:00Z

The start time when the plan is scheduled to begin. The time format is yyyy-MM-ddTHH:mm:ssZ (UTC time).

tip

This field will only be returned for tasks that are in the "Waiting to start", "Waiting to execute", or "Waiting to switch" state.

ScheduledSwitchEndTime
String
2024-12-20T17:59:00Z

The deadline for the planned switch. The time format is yyyy-MM-ddTHH:mm:ssZ (UTC time).

tip

This field will only be returned for tasks in the "Waiting to start", "Waiting to execute", or "Waiting to switch" status.

ScheduledSwitchStartTime
String
2024-12-20T16:00:00Z

The start time of the planned switch. The time format is yyyy-MM-ddTHH:mm:ssZ (UTC time).

tip

This field is only returned for tasks in the "Waiting to start", "Waiting to execute", or "Waiting to switch" state.

StartTime
String
2024-01-29T12:38:25.725Z
The start time of the task. The time format is yyyy-MM-ddTHH:mm:ssZ (UTC time).
TaskAction
String
CreateDBAccount
Task name.
TaskCategory
String
BackupRecoveryManagement

Task classification. Values:

  • BackupRecoveryManagement: Backup and recovery management.
  • DatabaseAdminManagement: Database administration management.
  • DatabaseProxy: Database proxy.
  • HighAvailability: High availability.
  • InstanceAttribute: Instance attributes.
  • InstanceManagement: Instance management.
  • MonitoringPerformance: Monitoring and performance.
  • NetworkManagement: Network management.
  • SecurityManagement: Security management.
  • SystemMaintainManagement: System operation and maintenance management.
  • VersionUpgrade: Version upgrade.
TaskDesc
String
This is a description of a task.
Task description information.
TaskId
String
202401221959431F6913166F6F5A21****-682d5d
Task ID.
TaskParams
String
{"InstanceId":"mysql-4233a4ba****","AccountName":"TestAccount","AccountPassword":"******","AccountType":"Normal","AccountDesc":""}
Task parameters.
TaskSource
String
User

Task source. Values:

  • User: Tenant.
  • System: System.
  • SystemUser: Internal operation and maintenance.
  • UserMaintain: Maintenance operations initiated by system/operation and maintenance administrators and visible to tenants.
TaskStatus
String
Success

Task status, valid values:

  • WaitSwitch: Waiting to switch.
  • WaitStart: Waiting to execute.
  • Canceled: Canceled.
  • Stopped: Terminated.
  • Running_BeforeSwitch: Running (before switching).
  • Timeout: Execution timed out.
  • Success: Execution succeeded.
  • Failed: Execution failed.
  • Running: Executing.
  • Stopping: Terminating.
TaskProgress
Object[]
[ { "Name": "InstanceInitialization", "StepStatus": "Success" }, { "Name": "InstanceRecoveryPreparation", "StepStatus": "Failed" }, { "Name": "DataBackupImport", "StepStatus": "UnExecuted" }, { "Name": "LogBackupBinlogAdd", "StepStatus": "UnExecuted" }, { "Name": "TaskSuccessful", "StepStatus": "UnExecuted" } ]
Progress details.
Name
String
InstanceInitialization

Step name. Values:

  • InstanceInitialization: Task initialization.
  • InstanceRecoveryPreparation: Instance recovery preparation.
  • DataBackupImport: Cold backup import.
  • LogBackupBinlogAdd: Binlog replay.
  • TaskSuccessful: Task successful.
StepStatus
String
Success

Step status. Values:

  • Running: In progress.
  • Success: Succeeded.
  • Failed: Failed.
  • Unexecuted: Not executed.
StepExtraInfo
Object[]
[ { "Type": "CurDataSize", "Unit": "Bytes", "Value": 7579256 }, { "Type": "RemainDataSize", "Unit": "Bytes", "Value": 0 } ]
Specific information about the steps.
Type
String
CurDataSize

Current stage

  • CostTime: The time consumed in the current stage.
  • CurDataSize: The amount of data imported currently.
  • CurBinlog: The number of Binlog files being replayed currently.
  • RemainCostTime: The remaining time to be consumed.
  • RemainDataSize: The remaining amount of data to be imported.
  • RemainBinlog: The remaining number of Binlog files to be replayed.
Unit
String
Bytes

Unit. Valid values:

  • MS: Milliseconds.
  • Bytes: Bytes.
  • Files: (Number of) files.
Value
Double
7579256
The specific values corresponding to the Type field.
OriginConfig
String
JSON format
CheckItems
Object[]
Please refer to the return example.

Results of the major version upgrade check.

tip

This field is only returned in the task details of UpgradeDBInstanceEngineMajorVersion.

CheckDetail
Object
{ "Impact": "The sorting of the results returned after SQL execution may differ from that before the upgrade.", "Issue": "After the upgrade, the default character collation is changed to utf8mb4_0900_ai_ci." }
Detailed information on the inspection items that failed to pass.
Issue
String
The sorting of the results returned after SQL execution may differ from that before the upgrade.
Problems that cause the inspection items to fail.
Impact
String
After the upgrade, the default character order is changed to utf8mb4_0900_ai_ci.
The impact brought by the issues that caused the failure of the inspection items after the upgrade.
Description
String
initConnectCheck
Description information of the inspection item.
ItemName
String
initConnectCheck
The name of the inspection item.
RiskLevel
String
Warning

The risk level of the items that failed the check. Values:

  • Notice: Prompt.
  • Warning: Warning.
  • Error: Error.
CheckItemLog
String
Please refer to the return examples.

Detection project log for major version upgrade of the instance.

tip

This field is only returned in the task details of UpgradeDBInstanceEngineMajorVersion.

Sample request

POST /?Action=DescribeTaskDetail&Version=2022-01-01 HTTP/1.1
Content-Type: application/json
Host: rds-mysql.cn-beijing.volcengineapi.com
X-Date: 20211202T101010Z
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_mysql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458****
{
    "TaskId": "20250410195816F9163BF4884FB4D2****-d4a831"
}

Sample response

{
    "ResponseMetadata": {
        "RequestId": "2025041020230200DE5340D9C3CDD649F0-88e6d8",
        "Action": "DescribeTaskDetail",
        "Version": "2022-01-01",
        "Service": "rds_mysql",
        "Region": "cn-beijing"
    },
    "Result": {
        "CheckItemLog": "{\"serverVersion\":\"5.7.32-log - MySQL Community Server (GPL)\",\"targetVersion\":\"8.0.32\",\"checksPerformed\":[{\"id\":\"circularDirectory\",\"status\":\"OK\",\"title\":\"Circular directory references in tablespace data file paths\"},{\"id\":\"engineMixup\",\"status\":\"OK\",\"title\":\"Tables recognized by InnoDB that belong to a different engine\"},{\"id\":\"changedFunctionsInGeneratedColumns\",\"status\":\"OK\",\"title\":\"Indexes on functions with changed semantics\"},{\"id\":\"columnsWhichCannotHaveDefaults\",\"status\":\"OK\",\"title\":\"Columns which cannot have default values\"},{\"id\":\"dollarSignName\",\"status\":\"OK\",\"title\":\"Check for deprecated usage of single dollar signs in object names\"},{\"id\":\"emptyDotTableSyntax\",\"status\":\"OK\",\"title\":\"Check for deprecated '.<table>' syntax used in routines.\"},{\"id\":\"authMethodUsage\",\"status\":\"OK\",\"title\":\"Check for deprecated or invalid user authentication methods.\"},{\"id\":\"deprecatedDefaultAuth\",\"status\":\"OK\",\"title\":\"Check for deprecated or invalid default authentication methods in system variables.\"},{\"id\":\"deprecatedRouterAuthMethod\",\"status\":\"OK\",\"title\":\"Check for deprecated or invalid authentication methods in use by MySQL Router internal accounts.\"},{\"id\":\"deprecatedTemporalDelimiter\",\"status\":\"OK\",\"title\":\"Check for deprecated temporal delimiters in table partitions.\"},{\"id\":\"indexTooLarge\",\"status\":\"OK\",\"title\":\"Check for indexes that are too large to work on higher versions of MySQL Server than 5.7\"},{\"id\":\"oldTemporal\",\"status\":\"OK\",\"title\":\"Usage of old temporal type\"},{\"id\":\"mysqlSchema\",\"status\":\"OK\",\"title\":\"Table names in the mysql schema conflicting with new tables in the latest MySQL.\"},{\"id\":\"nonNativePartitioning\",\"status\":\"OK\",\"title\":\"Partitioned tables using engines with non native partitioning\"},{\"id\":\"foreignKeyLength\",\"status\":\"OK\",\"title\":\"Foreign key constraint names longer than 64 characters\"},{\"id\":\"maxdbSqlModeFlags\",\"status\":\"OK\",\"title\":\"Usage of obsolete MAXDB sql_mode flag\"},{\"id\":\"obsoleteSqlModeFlags\",\"status\":\"OK\",\"title\":\"Usage of obsolete sql_mode flags\",\"detectedProblems\":[{\"dbObject\":\"@@global.sql_mode\",\"dbObjectType\":\"SystemVariable\",\"description\":\"defined using obsolete NO_AUTO_CREATE_USER option\",\"level\":\"Notice\"}]},{\"id\":\"enumSetElementLength\",\"status\":\"OK\",\"title\":\"ENUM/SET column definitions containing elements longer than 255 characters\"},{\"id\":\"groupbyAscSyntax\",\"status\":\"OK\",\"title\":\"Usage of removed GROUP BY ASC/DESC syntax\"},{\"id\":\"invalid57Names\",\"status\":\"OK\",\"title\":\"Check for invalid table names and schema names used in 5.7\",\"solutions\":[\"In order to fix them use the mysqlcheck utility as follows:\\n\\n  $ mysqlcheck --check-upgrade --all-databases\\n  $ mysqlcheck --fix-db-names --fix-table-names --all-databases\\n\\nOR via mysql client, for eg:\\n\\n  ALTER DATABASE `#mysql50#lost+found` UPGRADE DATA DIRECTORY NAME;\"]},{\"id\":\"invalidEngineForeignKey\",\"status\":\"OK\",\"title\":\"Check for columns that have foreign keys pointing to tables from a different database engine.\"},{\"id\":\"routineSyntax\",\"status\":\"OK\",\"title\":\"MySQL syntax check for routine-like objects\"},{\"id\":\"reservedKeywords\",\"status\":\"OK\",\"title\":\"Usage of db objects with names conflicting with new reserved keywords\"},{\"id\":\"partitionedTablesInSharedTablespaces\",\"status\":\"OK\",\"title\":\"Usage of partitioned tables in shared tablespaces\"},{\"id\":\"removedFunctions\",\"status\":\"OK\",\"title\":\"Usage of removed functions\"},{\"id\":\"zeroDates\",\"status\":\"OK\",\"title\":\"Zero Date, Datetime, and Timestamp values\"},{\"id\":\"orphanedObjects\",\"status\":\"OK\",\"title\":\"Check for orphaned routines and events in 5.7\"},{\"id\":\"pluginUsage\",\"status\":\"OK\",\"title\":\"Check for deprecated or removed plugin usage.\"}]}",
        "CheckItems": [
            {
                "CheckDetail": {
                    "Impact": "SQL 执行后返回结果的排序可能与升级前有差异。",
                    "Issue": "升级后默认字符序变更为 utf8mb4_0900_ai_ci。"
                },
                "Description": "检查 init_connect 参数:检测是否配置了连接初始化 SQL 语句,评估其在 MySQL 8.0 中的执行安全性。",
                "ItemName": "initConnectCheck",
                "RiskLevel": "Warning"
            },
            {
                "CheckDetail": {
                    "Impact": "升级后 default_collation_for_utf8mb4 参数默认配置为 utf8mb4_general_ci。"
                },
                "Description": "检查 utf8mb4 默认排序规则:确认 utf8mb4 字符集的默认排序规则是否为 utf8mb4_0900_ai_ci(MySQL 8.0 推荐值)。",
                "ItemName": "defaultCollationForUTF8MB4Check",
                "RiskLevel": "Warning"
            },
            {
                "CheckDetail": {
                    "Impact": "升级后SQL行为可能存在差异。",
                    "Issue": "使用了已废弃的 sql_mode 选项(如 NO_FIELD_OPTIONS)。"
                },
                "Description": "检查已废弃的 SQL_MODE 模式:识别使用了 MySQL 8.0 中已删除的 SQL 模式(如 NO_FIELD_OPTIONS),需更新配置以避免意外行为。",
                "ItemName": "obsoleteSqlModeFlags",
                "RiskLevel": "Warning"
            },
            {
                "CheckDetail": {
                    "Impact": "升级后相关参数将被忽略,涉及参数包含 [innodb_large_prefix,innodb_stats_sample_pages,metadata_locks_cache_size,query_cache_limit,query_cache_min_res_unit,query_cache_size,query_cache_type,query_cache_wlock_invalidate,secure_auth,sync_frm]。",
                    "Issue": "使用了在 MySQL 8.0 中废弃的参数。"
                },
                "Description": "检查系统参数变更:验证参数是否被废弃(如 query_cache_size)。",
                "ItemName": "removedSysVars",
                "RiskLevel": "Warning"
            }
        ],
        "TaskInfo": {
            "CostTimeMS": 601800,
            "CreateTime": "2025-04-10T08:29:06.577Z",
            "FinishTime": "2025-04-10T08:39:08.377Z",
            "ModifyTime": "2025-04-10T08:40:10.548Z",
            "OwnerHostIP": "10.56.55.154",
            "OwnerIP": "11.209.236.103",
            "OwnerName": "rdsmgr-6594668b96-btd54",
            "Progress": 0,
            "RelatedInstanceInfos": {
                "InstanceID": "mysql-0f7032f1****"
            },
            "StartTime": "2025-04-10T08:29:06.577Z",
            "TaskAction": "UpgradeDBInstanceEngineMajorVersion",
            "TaskCategory": "VersionUpgrade",
            "TaskComplexity": "High",
            "TaskDesc": "",
            "TaskId": "20250410162906B3FB2CBF4C3BBEC5****-964567",
            "TaskParams": "{\"InstanceId\":\"mysql-0f7032f1****\",\"TargetMajorVersion\":\"MySQL 8.0.32\",\"MySQLSlaveDelayThreshold\":10}",
            "TaskProgressInfo": [
                {
                    "Name": "任务初始化",
                    "StepProgress": 100,
                    "StepStatus": "Success"
                },
                {
                    "Name": "资源处理",
                    "StepProgress": 100,
                    "StepStatus": "Success"
                },
                {
                    "Name": "数据处理",
                    "StepExtraInfo": [
                        "节点1:当前已完成:4.11 GiB,共需要处理:4.11 GiB",
                        "节点2:当前已完成:4.11 GiB,共需要处理:4.11 GiB",
                        "节点3:当前已完成:4.11 GiB,共需要处理:4.11 GiB",
                        "节点4:当前已完成:4.11 GiB,共需要处理:4.11 GiB"
                    ],
                    "StepProgress": 100,
                    "StepStatus": "Success"
                },
                {
                    "Name": "数据追齐",
                    "StepProgress": 100,
                    "StepStatus": "Success"
                },
                {
                    "Name": "切换",
                    "StepProgress": 100,
                    "StepStatus": "Success"
                },
                {
                    "Name": "等待任务继续",
                    "StepExtraInfo": [
                        "实例切换到目标版本后,任务将进入\"等待执行\"阶段,实例状态将保持为\"升级中\"。在此期间,您可选择“取消”以回退到升级前状态,或选择\"立即执行\"以完成升级。如果\"等待执行\"阶段持续时间超过观测时长,系统则会自动完成升级。"
                    ],
                    "StepProgress": 100,
                    "StepStatus": "Success"
                },
                {
                    "Name": "后置维护",
                    "StepProgress": 100,
                    "StepStatus": "Success"
                },
                {
                    "Name": "任务结束",
                    "StepProgress": 100,
                    "StepStatus": "Success"
                }
            ],
            "TaskReason": "User operation",
            "TaskSource": "User",
            "TaskStatus": "Success"
        }
    }
}

Error codes

For more details, refer to Error codes.

Last updated: 2025.12.04 11:25:46