Error in Synchronizing MySQL Data to TiDB Using DM

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: dm同步mysql数据到tidb报错

| username: TiDBer_xmQUZWpA

[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version] v6.6.0
[Reproduction Path] Operations performed that led to the issue
Error when synchronizing MySQL data to TiDB using DM
[Encountered Issue: Issue Phenomenon and Impact]
[Resource Configuration]
[Attachments: Screenshots / Logs / Monitoring]

tiup dmctl --master-addr 172.23.45.66:8261 query-status task1.yaml

tiup is checking updates for component dmctl …
Starting component dmctl: /root/.tiup/components/dmctl/v7.2.0/dmctl/dmctl --master-addr 172.23.45.66:8261 query-status task1.yaml
{
“result”: true,
“msg”: “”,
“sources”: [
{
“result”: true,
“msg”: “”,
“sourceStatus”: {
“source”: “mysql-01”,
“worker”: “dm-172.23.45.66-8262”,
“result”: null,
“relayStatus”: null
},
“subTaskStatus”: [
{
“name”: “test”,
“stage”: “Paused”,
“unit”: “Load”,
“result”: {
“isCanceled”: false,
“errors”: [
{
“ErrCode”: 34019,
“ErrClass”: “load-unit”,
“ErrScope”: “internal”,
“ErrLevel”: “high”,
“Message”: “”,
“RawCause”: “[Lightning:Restore:ErrCreateSchema]create schema failed, table: ec_order_prd.b2b_order_back, stmt: restore table schema: run create schema job failed: Error 1273 (HY000): Unsupported collation when new collation is enabled: ‘utf8mb4_danish_ci’”,
“Workaround”: “”
}
],
“detail”: null
},
“unresolvedDDLLockID”: “”,
“load”: {
“finishedBytes”: “0”,
“totalBytes”: “0”,
“progress”: “0.00 %”,
“metaBinlog”: “(mysql-bin.032596, 85460562)”,
“metaBinlogGTID”: “2a634108-ce32-11ed-9dcb-fa163e429be7:1-337913430”,
“bps”: “0”
},
“validation”: null
}
]
}
]
}

| username: Billmay表妹 | Original post link

Let’s see if it’s a character set issue.

| username: 我是咖啡哥 | Original post link

Your cousin is right: “Unsupported collation when new collation is enabled: ‘utf8mb4_danish_ci’”.

| username: TiDB_C罗 | Original post link

Is this a business requirement or a configuration error, Danish language?

| username: TiDBer_xmQUZWpA | Original post link

It looks like there is an issue with the collation of the character set. Does this error refer to the character set on the MySQL side or the TiDB side?

| username: tidb菜鸟一只 | Original post link

TiDB does not support the utf8mb4_danish_ci collation. It looks like the table on your source side is using this collation…

| username: TiDBer_xmQUZWpA | Original post link

There is an issue with the collation of a field in the MySQL table: Problem found:
order_no varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_danish_ci NOT NULL DEFAULT ‘’ COMMENT ‘Order Number’,

| username: TiDBer_xmQUZWpA | Original post link

Found the problem, thank you:
The table’s field is designed like this. Does TiDB not support this collation:
order_no varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_danish_ci NOT NULL DEFAULT ‘’ COMMENT ‘Order number’,

| username: TiDBer_xmQUZWpA | Original post link

Thank you, cousin.

| username: TiDBer_xmQUZWpA | Original post link

Thank you, Coffee Brother.

| username: TiDBer_xmQUZWpA | Original post link

Thank you, C Ronaldo.

| username: TiDBer_xmQUZWpA | Original post link

Thank you, TiDB newbie.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.