用dm把mysql的数据导入tidb失败

执行完下面的命令发现tidb中没有mysql的库

[tidb@localhost ~]$ tiup dmctl --master-addr 192.168.100.77:8261 start-task testdm-task.yaml
tiup is checking updates for component dmctl ...timeout(2s)!
Starting component `dmctl`: /home/tidb/.tiup/components/dmctl/v6.6.0/dmctl/dmctl --master-addr 192.168.100.77:8261 start-task testdm-task.yaml
{
    "result": true,
    "msg": "",
    "sources": [
        {
            "result": true,
            "msg": "",
            "source": "mysql-01",
            "worker": "dm-192.168.100.77-8262"
        }
    ],
    "checkResult": "pre-check is passed. "
}
[tidb@localhost ~]$ tiup dmctl --master-addr 192.168.100.77:8261 query-status testdm
tiup is checking updates for component dmctl ...timeout(2s)!
Starting component `dmctl`: /home/tidb/.tiup/components/dmctl/v6.6.0/dmctl/dmctl --master-addr 192.168.100.77:8261 query-status testdm
{
    "result": true,
    "msg": "",
    "sources": [
        {
            "result": true,
            "msg": "",
            "sourceStatus": {
                "source": "mysql-01",
                "worker": "dm-192.168.100.77-8262",
                "result": null,
                "relayStatus": null
            },
            "subTaskStatus": [
                {
                    "name": "testdm",
                    "stage": "Running",
                    "unit": "Sync",
                    "result": null,
                    "unresolvedDDLLockID": "",
                    "sync": {
                        "totalEvents": "2",
                        "totalTps": "0",
                        "recentTps": "0",
                        "masterBinlog": "(binfile.000002, 48060270)",
                        "masterBinlogGtid": "",
                        "syncerBinlog": "(binfile.000002, 48060270)",
                        "syncerBinlogGtid": "",
                        "blockingDDLs": [
                        ],
                        "unresolvedGroups": [
                        ],
                        "synced": true,
                        "binlogType": "remote",
                        "secondsBehindMaster": "0",
                        "blockDDLOwner": "",
                        "conflictMsg": "",
                        "totalRows": "0",
                        "totalRps": "0",
                        "recentRps": "0"
                    },
                    "validation": null
                }
            ]
        }
    ]
}

你的dm版本和集群版本是不是不一样啊;
查看一下数据目录下的元数据文件是不是齐全;

您帮我看一下我的版本有问题吗,我有点看不懂

[tidb@localhost ~]$ tiup --version
1.11.3 tiup
Go Version: go1.19.5
Git Ref: v1.11.3
GitHash: 7223ed50460785a2adf666d511a257aa03110294
[tidb@localhost ~]$ tiup cluster --version
tiup is checking updates for component cluster ...
A new version of cluster is available:
   The latest version:         v1.11.3
   Local installed version:    v1.11.1
   Update current component:   tiup update cluster
   Update all components:      tiup update --all

Starting component `cluster`: /home/tidb/.tiup/components/cluster/v1.11.1/tiup-cluster --version
tiup version 1.11.1 tiup
Go Version: go1.19.2
Git Ref: v1.11.1
GitHash: b95172df211e4f9b643590f2dd8436ad60c72b38
[tidb@localhost ~]$ tiup dm --version
tiup is checking updates for component dm ...
Starting component `dm`: /home/tidb/.tiup/components/dm/v1.11.3/tiup-dm --version
tiup version 1.11.3 tiup
Go Version: go1.19.5
Git Ref: v1.11.3
GitHash: 7223ed50460785a2adf666d511a257aa03110294
[tidb@localhost ~]$ 

到底报什么 错误呢 ????

tiup cluster list —查看集群版本
tiup dm list — 查看dm版本

详细的失败的 报错日志 发下吧。越详细越好。

dm和tidb的版本不一致,我改成一致的试试,谢谢

不一致 会有很多,稀奇古怪的问题。 搞一致吧

没事您把 官方文档 看一遍吧, 您的问题 官方文档 都能解决,建议啊。

是dm没有5.0.0这个版本吗

[tidb@localhost ~]$ tiup cluster list
tiup is checking updates for component cluster ...
A new version of cluster is available:
   The latest version:         v1.11.3
   Local installed version:    v1.11.1
   Update current component:   tiup update cluster
   Update all components:      tiup update --all

Starting component `cluster`: /home/tidb/.tiup/components/cluster/v1.11.1/tiup-cluster list
Name       User  Version  Path                                                 PrivateKey
----       ----  -------  ----                                                 ----------
tidb-test  tidb  v5.0.0   /home/tidb/.tiup/storage/cluster/clusters/tidb-test  /home/tidb/.tiup/storage/cluster/clusters/tidb-test/ssh/id_rsa
[tidb@localhost ~]$ tiup dm list
tiup is checking updates for component dm ...
Starting component `dm`: /home/tidb/.tiup/components/dm/v1.11.3/tiup-dm list
Name     User  Version  Path                                          PrivateKey
----     ----  -------  ----                                          ----------
dm-test  tidb  v6.0.0   /home/tidb/.tiup/storage/dm/clusters/dm-test  /home/tidb/.tiup/storage/dm/clusters/dm-test/ssh/id_rsa
[tidb@localhost ~]$ 
[tidb@localhost ~]$ 
[tidb@localhost ~]$ 
[tidb@localhost ~]$ 
[tidb@localhost ~]$ tiup uninstall dmctl --all
Uninstalled component `dmctl` successfully!
[tidb@localhost ~]$ tiup install dmctl:v5.0.0
Error: version v5.0.0 on linux/amd64 for component dmctl not found: unknown version
[tidb@localhost ~]$ tiup install dmctl:5.0.0
Error: version 5.0.0 on linux/amd64 for component dmctl not found: unknown version
[tidb@localhost ~]$ 

我记得升级 不需要卸载吧。

https://docs.pingcap.com/zh/tidb/stable/maintain-dm-using-tiup

您安装低版本吗 ??

image
这个是 您现在的 版本。 您的 tidb 版本是多少呢 ??

还有可能 不是 版本的 问题啊 。 您的具体排查下原因啊

我太难了,那会儿有个人让我卸载了重装5.0.0版本,我就卸载了,我的tidb版本是5.0.0,现在我又把dm重新装上了,版本是6.0.0,怎么能把dm也变成5.0.0呢,具体原因看不到日志,也不报错

刚才误删了一个回复
tiup list dmctl
列出dmctl可用版本,这个一般是和dm统一的,另外dm版本是这样部署时指定的

tiup dm deploy dm-test ${version} ./topology.yaml --user root [-p] [-i /home/root/.ssh/gcp_rsa]


您把这个参数添加到 任务里面。 看看 dumpling 出来的 数据 ,是不是有问题

还有就是 元数据 库 dm_meta 清空 该任务的 涉及的相关内容
image
chognxin重新跑一次,看看

我加了这个参数了,然后重新跑了一遍,请问dumpling 出来的 数据怎么看

在 worker 目录下

我发现数据库名字叫sys不能同步,叫其他名字的数据库可以同步