You need to enable JavaScript to run this app.
文档中心
云数据库 MySQL 版

云数据库 MySQL 版

复制全文
下载 pdf
实例管理
DescribeUpgradeEngineMajorVersionPrecheckResult - 查询升级实例大版本的预检查结果
复制全文
下载 pdf
DescribeUpgradeEngineMajorVersionPrecheckResult - 查询升级实例大版本的预检查结果
调用 DescribeUpgradeEngineMajorVersionPrecheckResult 接口查询升级实例大版本的预检查结果。
请求类型
同步请求。
注意事项
传入必选参数 InstanceId 后:
  • 如传入 EventId,则返回 EventId 指定的预检查的结果。
  • 如不传入 EventId,则返回实例所有的预检查结果。
调试
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
请求参数
参数
类型
是否必选
示例值
描述
InstanceId
String
mysql-7510ba07****
实例 ID。
EventId
String
20250410145924BA7FA42A930CFDBD****-83bd31
升级实例大版本预检查的事件 ID。
说明
无默认值。如不设定,则按照其他字段设定的查询条件返回。
返回参数
参数
类型
示例值
描述
PrecheckResults
请参见返回示例。
升级实例大版本前的预检查的结果。
UpgradeEngineMajorVersionPrecheckResult
参数
类型
示例值
描述
CheckTime
String
2025-04-10T06:22:12.223Z
执行预检查的时间。格式为 yyyy-MM-ddTHH:mm:ss.sssZ(UTC 时间)。
EffectiveTime
String
2025-04-11T06:22:12.223Z
预检查结果有效期的截止时间。预检查结果的有效期为 24 小时。
MySqlShellLog
String
请参见返回示例。
mysql-shell 执行日志。
PrecheckItems
Array of CheckItem
请参见返回示例。
预检查结果中检测项的详细信息。
Progress
Long
100
预检查的执行进度。单位为 %。
Result
String
Pass
预检查的结果。取值:
  • Pass:通过。
  • Failed:失败。
SourceMajorVersion
String
MySQL 5.7.32
实例当前的大版本。
TargetMajorVersion
String
MySQL 8.0.43
实例升级的目标大版本。当前仅支持为 MySQL 8.0.43
TaskId
String
202504101422038F2D335B42B87473****-dd6b85
任务 ID。
CheckItem
参数
类型
示例值
描述
CheckDetail
Object of CheckDetail
{
"Impact": "SQL 执行后返回结果的排序可能与升级前有差异。",
"Issue": "升级后默认字符序变更为 utf8mb4_0900_ai_ci。"
}
未能通过的检查项的详细信息。
Description
String
initConnectCheck
检查项的描述信息。
ItemName
String
initConnectCheck
检查项的名称。
RiskLevel
String
Warning
未能通过检查项的风险等级。取值:
  • Notice:提示。
  • Warning:警告。
  • Error:错误。
CheckDetail
参数
类型
示例值
描述
Issue
String
SQL 执行后返回结果的排序可能与升级前有差异。
导致未能通过检查项的问题。
Impact
String
升级后默认字符序变更为 utf8mb4_0900_ai_ci。
导致未能通过检查项的问题在升级后带来的影响。
示例
请求示例
POST /?Action=DescribeUpgradeEngineMajorVersionPrecheckResult&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****
{
"InstanceId": "mysql-7510ba07****"
}
返回示例
{
"ResponseMetadata": {
"RequestId": "20250410142702096CC29BD0CB77B6337B-27c823",
"Action": "DescribeUpgradeEngineMajorVersionPrecheckResult",
"Version": "2022-01-01",
"Service": "rds_mysql",
"Region": "cn-beijing"
},
"Result": {
"PrecheckResults": [
{
"CheckTime": "2025-04-10T06:22:12.223Z",
"EffectiveTime": "2025-04-11T06:22:12.223Z",
"MySqlShellLog": "{\"serverVersion\":\"5.7.32-log - MySQL Community Server (GPL)\",\"targetVersion\":\"8.0.43\",\"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.\"}]}",
"PrecheckItems": [
{
"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"
}
],
"Progress": 100,
"Result": "Pass",
"SourceMajorVersion": "MySQL 5.7.32",
"TargetMajorVersion": "MySQL 8.0.43",
"TaskId": "202504101422038F2D335B42B87473AE92-dd6b85"
}
]
}
}
错误码
更多详情,请参见错误码
最近更新时间:2026.06.10 10:58:16
这个页面对您有帮助吗?
有用
有用
无用
无用