dumpling 从 tidb 导出数据报错

【 TiDB 使用环境】生产环境
【 TiDB 版本】 v6.2.0 / dumpling v6.5.0
【复现路径】

tiup dumpling -h 127.0.0.1  -P 4000  -u root -p'xxxxx' --filter 'mydatabase.xx' --where "addr = xxxx" --filetype sql  -o /tmp/tidb

【遇到的问题:问题现象及影响】
dump failed error stack info
cannot convert string from binary to utf8mb4

[2023/02/23 10:51:38.186 +00:00] [ERROR] [main.go:77] [“dump failed error stack info”] [error=“Error 1105: cannot convert string from binary to utf8mb4”] [errorVerbose=“Error 1105: cannot convert string from binary to utf8mb4\ngithub.com/pingcap/errors.AddStack\n\tgithub.com/pingcap/errors@v0.11.5-0.20220729040631-518f63d66278/errors.go:174\ngithub.com/pingcap/errors.Trace\n\tgithub.com/pingcap/errors@v0.11.5-0.20220729040631-518f63d66278/juju_adaptor.go:15\ngithub.com/pingcap/tidb/dumpling/export.(*multiQueriesChunkIter).nextRows.func1\n\tgithub.com/pingcap/tidb/dumpling/export/ir_impl.go:86\ngithub.com/pingcap/tidb/dumpling/export.(*multiQueriesChunkIter).nextRows\n\tgithub.com/pingcap/tidb/dumpling/export/ir_impl.go:104\ngithub.com/pingcap/tidb/dumpling/export.newMultiQueryChunkIter\n\tgithub.com/pingcap/tidb/dumpling/export/ir_impl.go:73\ngithub.com/pingcap/tidb/dumpling/export.(*multiQueriesChunk).Rows\n\tgithub.com/pingcap/tidb/dumpling/export/ir_impl.go:361\ngithub.com/pingcap/tidb/dumpling/export.WriteInsert\n\tgithub.com/pingcap/tidb/dumpling/export/writer_util.go:152\ngithub.com/pingcap/tidb/dumpling/export.FileFormat.WriteInsert\n\tgithub.com/pingcap/tidb/dumpling/export/writer_util.go:660\ngithub.com/pingcap/tidb/dumpling/export.(*Writer).tryToWriteTableData\n\tgithub.com/pingcap/tidb/dumpling/export/writer.go:239\ngithub.com/pingcap/tidb/dumpling/export.(*Writer).WriteTableData.func1\n\tgithub.com/pingcap/tidb/dumpling/export/writer.go:224\ngithub.com/pingcap/tidb/br/pkg/utils.WithRetry\n\tgithub.com/pingcap/tidb/br/pkg/utils/retry.go:52\ngithub.com/pingcap/tidb/dumpling/export.(*Writer).WriteTableData\n\tgithub.com/pingcap/tidb/dumpling/export/writer.go:192\ngithub.com/pingcap/tidb/dumpling/export.(*Writer).handleTask\n\tgithub.com/pingcap/tidb/dumpling/export/writer.go:115\ngithub.com/pingcap/tidb/dumpling/export.(*Writer).run\n\tgithub.com/pingcap/tidb/dumpling/export/writer.go:93\ngithub.com/pingcap/tidb/dumpling/export.(*Dumper).startWriters.func4\n\tgithub.com/pingcap/tidb/dumpling/export/dump.go:356\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\tgolang.org/x/sync@v0.1.0/errgroup/errgroup.go:75\nruntime.goexit\n\truntime/asm_amd64.s:1594”]

dump failed: Error 1105: cannot convert string from binary to utf8mb4

【资源配置】
【附件:截图/日志/监控】

看起来像是字符集问题,在 --params 选项中加入字符集相关变量试试

dumpling版本换成6.2.0试试

我试了 6.2.0 的版本,是抱一样的错

具体是哪个变量哈,我们集群所有的字符集都是默认的 utf8mb4

我更换了 --sql 的方式执行。导出 csv 成功了