DM Dumping Issue

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

Original topic: dm dumping问题

| username: tidb狂热爱好者

【TiDB Usage Environment】Production Environment / Testing / Poc
【TiDB Version】
【Reproduction Path】What operations were performed when the issue occurred
【Encountered Issue: Issue Phenomenon and Impact】
【Resource Configuration】Enter TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
【Attachments: Screenshots / Logs / Monitoring】

Release version: v7.5.0
Git commit hash: 069631e2ecfedc000ffb92c67207bea81380f020
Git branch: heads/refs/tags/v7.5.0
Build timestamp: 2023-11-24 08:41:54Z
Go version: go version go1.21.3 linux/amd64

[2023/12/29 03:27:52.566 +00:00] [INFO] [versions.go:54] [“Welcome to dumpling”] [“Release Version”=v7.5.0] [“Git Commit Hash”=069631e2ecfedc000ffb92c67207bea81380f020] [“Git Branch”=heads/refs/tags/v7.5.0] [“Build timestamp”=“2023-11-24 08:41:54”] [“Go Version”=“go version go1.21.3 linux/amd64”]
[2023/12/29 03:27:54.068 +00:00] [WARN] [version.go:327] [“select tidb_version() failed, will fallback to ‘select version();’”] [error=“Error 1046 (3D000): No database selected”]
[2023/12/29 03:27:54.282 +00:00] [INFO] [version.go:434] [“detect server version”] [type=MySQL] [version=8.0.23]
[2023/12/29 03:27:54.496 +00:00] [WARN] [dump.go:1420] [“error when use FLUSH TABLE WITH READ LOCK, fallback to LOCK TABLES”] [error=“sql: FLUSH TABLES WITH READ LOCK: Error 1045 (28000): Access denied for user ‘future’@‘%’ (using password: YES)”] [errorVerbose=“Error 1045 (28000): Access denied for user ‘future’@‘%’ (using password: YES)\nsql: FLUSH TABLES WITH READ LOCK\\n\\\n\\\n\\\n\\nmain.main\n\t./main.go:70\nruntime.main\n\truntime/proc.go:267\nruntime.goexit\n\truntime/asm_amd64.s:1650”]
The password is correct, but MySQL 8 reports an error.

| username: 像风一样的男子 | Original post link

Error 1045 could be due to incorrect command parameters, dumpling -u root -P 4000 -p password

| username: 春风十里 | Original post link

Are you using dumpling to back up MySQL 8.0? Could it be an issue with the password authentication method, as the default in 8.0 is no longer the mysql native password storage method?

| username: Kongdom | Original post link

  1. Was it exported from TiDB or MySQL8? If it was exported from MySQL8, it might be incompatible, as I couldn’t find any information supporting MySQL8.0.
  2. Check if the password contains special characters. I have encountered login failures before due to special characters in the password. Pay special attention to -P being the port and -p being the password.
| username: wangccsy | Original post link

Did you lock the table?

| username: Jellybean | Original post link

Judging by the error here, it is most likely a compatibility issue between dumpling and MySQL 8.0. You can try verifying it with MySQL 5.7.

| username: dba远航 | Original post link

[“select tidb_version() failed, will fallback to ‘select version();’”] [error=“Error 1046 (3D000): No database selected”], please check the version.

| username: Kongdom | Original post link

Looking here, it seems to be a compatibility issue, directly indicating that no database is selected.

| username: dba远航 | Original post link

Test it more and see.