DM从上游mysql8.0预检查不通过

【 TiDB 使用环境】生产环境 /测试/ Poc
【 TiDB 版本】 v8.1.1
【复现路径】做过哪些操作出现的问题
【遇到的问题:问题现象及影响】

DM版本如下:

DM任务预检查报错如下:

# tiup dmctl check-task ./source02-task.yaml  

Checking updates for component dmctl... Timedout (after 2s)
Starting component dmctl: /root/.tiup/components/dmctl/v8.3.0/dmctl/dmctl check-task ./source02-task.yaml
{
    "result": false,
    "msg": "[code=26005:class=dm-master:scope=internal:level=medium], Message: fail to check synchronization configuration with type: check was failed, please see detail
        detail: {
                "results": [
                        {
                                "id": 0,
                                "name": "mysql_version",
                                "desc": "check whether mysql version is satisfied",
                                "state": "warn",
                                "errors": [
                                        {
                                                "severity": "warn",
                                                "short_error": "version suggested less than 8.0.0 but got 8.0.39"
                                        }
                                ],
                                "extra": "address of db instance - 10.0.72.94:3308"
                        },
                        {
                                "id": 9,
                                "name": "table structure compatibility check",
                                "desc": "check compatibility of table structure",
                                "state": "fail",
                                "errors": [
                                        {
                                                "severity": "warn",
                                                "short_error": "table `erp_dc_ht_prod`.`abpuserroles` Foreign Key FK_AbpUserRoles_AbpRoles_RoleId is parsed but ignored by TiDB.",
                                                "instruction": "please ref document: https://docs.pingcap.com/tidb/stable/mysql-compatibility#unsupported-features"
                                        },
                                        {
                                                "severity": "warn",
                                                "short_error": "table `erp_dc_ht_prod`.`abpuserroles` Foreign Key FK_AbpUserRoles_AbpUsers_UserId is parsed but ignored by TiDB.",
                                                "instruction": "please ref document: https://docs.pingcap.com/tidb/stable/mysql-compatibility#unsupported-features"
                                        },
                                        {
                                                "severity": "warn",
                                                "short_error": "table `erp_dc_ht_prod`.`abpusertokens` Foreign Key FK_AbpUserTokens_AbpUsers_UserId is parsed but ignored by TiDB.",
                                                "instruction": "please ref document: https://docs.pingcap.com/tidb/stable/mysql-compatibility#unsupported-features"
                                        },
                                        {
                                                "severity": "warn",
                                                "short_error": "table `erp_dc_ht_prod`.`abpuserlogins` Foreign Key FK_AbpUserLogins_AbpUsers_UserId is parsed but ignored by TiDB.",
                                                "instruction": "please ref document: https://docs.pingcap.com/tidb/stable/mysql-compatibility#unsupported-features"
                                        },
                                        {
                                                "severity": "warn",
                                                "short_error": "table `erp_dc_ht_prod`.`cm_attachmenttypeitem` Foreign Key FK_CM_AttachmentTypeItem_CM_AttachmentType_AttachmentTypeId is parsed but ignored by TiDB.",
                                                "instruction": "please ref document: https://docs.pingcap.com/tidb/stable/mysql-compatibility#unsupported-features"
                                        },
                                        {
                                                "severity": "fail",
                                                "short_error": "statement CREATE TABLE `cm_contractmodel` (\n  `Id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,\n  `CreationTime` datetime(6) NOT NULL,\n  `CreatorId` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,\n  `LastModificationTime` datetime(6) DEFAULT NULL,\n  `LastModifierId` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,\n  `IsDeleted` tinyint(1) NOT NULL DEFAULT '0',\n  `DeleterId` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,\n  `DeletionTime` datetime(6) DEFAULT NULL,\n  `TenantId` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,\n  `VirtalPath` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '相对路径',\n  `ModelRemark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '范本说明',\n  `DocName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '合同范本名称',\n  `RefTable` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'RefTable',\n  `RefRecordId` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'RefRecordId',\n  `RecordStatus` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '状态',\n  `DocModelId` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '合同范本Id',\n  `FifleName` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '文件名称',\n  `FifleId` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '上传文件Id',\n  `Discriminator` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',\n  `DocumentSuffix` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,\n  `FileSize` int NOT NULL DEFAULT (0),\n  PRIMARY KEY (`Id`) USING BTREE,\n  KEY `IDX_CM_ContractModel_1` (`RefRecordId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='合同范本表': line 22 column 36 near \"(0),\n  PRIMARY KEY (`Id`) USING BTREE,\n  KEY `IDX_CM_ContractModel_1` (`RefRecordId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='合同范本表'\" "
                                        }
                                ]
                        }
                ],
                "summary": {
                        "passed": false,
                        "total": 10,
                        "successful": 8,
                        "failed": 1,
                        "warning": 1
                }
        }"
}

DM任务source02-task.yaml如下

[root@centostemplate dm-single]# cat source02-task.yaml  -n
     1  name: "task_source02"
     2  task-mode: all
     3
     4  target-database:
     5    host: "10.0.72.94"
     6    port: 4000
     7    user: "root"
     8    password: "XXXXXXXXX"
     9
    10  mysql-instances:
    11     - source-id: "source02"
    12       block-allow-list:  "ba-rule1"
    13
    14  block-allow-list:
    15       ba-rule1:
    16          ignore-dbs: ["mysql","information_schema","performance_schema","sys"] 

【资源配置】进入到 TiDB Dashboard -集群信息 (Cluster Info) -主机(Hosts) 截图此页面
【附件:截图/日志/监控】

“short_error”: “version suggested less than 8.0.0 but got 8.0.39”

你的dm集群版本低了是6.0,不支持mysql8.需要升级。最小LTS版本要求是8.1。

1 个赞

感谢,确实是升级了DM组件到v8.1.1那个fail就消失了,只剩下warn了

1 个赞

现在DM的版本规则也是跟着TIDB走了吗?

是的,现在ticdc,lightning,dm这些都跟着tidb的版本一起发布的。

学到了 感谢

同步,迁移,工具的版本兼容一致,在所有数据库里基本都是向后兼容的

大佬厉害了,话说dm竟然要到8.1才支持mysql8.0,没怎么用过

我印象中好像7.5之后就支持8.0了,但是DM的支持似乎一直不太好

这个问题遇到过,确实是需要升级DM版本

此话题已在最后回复的 7 天后被自动关闭。不再允许新回复。