【BUG?】DM Migrated Data Without Errors, But No Data in Target Database

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

Original topic: 【BUG?】DM迁移数据,没有出错,但目标库没有数据

| username: Clover

[TiDB Usage Environment] Poc
[TiDB Version] 7.3

dm/v1.13.0
mysql5.7.30
CentOS Linux release 7.5.1804 (Core)

Requirement: Migrate the entire databases “clover” and “db01” and the k table under the test database.

Reproduce the issue by writing yml as shown in image 33 or configuring through the page as shown in image 66.


Migrate the entire databases “clover” and “db01” and the k table under the test database.

block-allow-list:
  bw-rule-1:                              # Name
    do-dbs: ["clover","db01"]
    do-tables:                        # Whitelist of upstream tables to be migrated.
    - db-name: "test"              # Name of the database containing the table to be migrated.
      tbl-name: "k"          # Name of the table to be migrated.


On the second day of trying, a colleague suggested using the web wizard. The configuration file generated by the web wizard is the same, but there are no errors, and the data is not migrated.


Details on why not

:roll_eyes:
Additionally, does it not support migrating multiple databases?

| username: TiDBer_oHSwKxOH | Original post link

Are you out of your mind?
Migrating two databases,
but writing the table “l” in the “test” database in the tables.

| username: redgame | Original post link

Did you import the wrong table?

| username: zhanggame1 | Original post link

It should be blocked.

| username: Clover | Original post link

Migrate the entire databases “clover” and “db01”, and the table “k” under the “test” database.

| username: TiDB_C罗 | Original post link

Try adding “test” to the whitelist as well.

| username: Clover | Original post link

When do-dbs wrote multiple (without filtering tables), there was no data.

| username: 大飞哥online | Original post link

It should be written like this, in line with your migrating the entire “clover” and “db01” databases, and the k table under the test database.

| username: Clover | Original post link

mysql-instances:
-
  # Upstream instance or replication group ID.
  source-id: "mysql-01"
  # The name of the black and white list configuration item for the databases or tables to be migrated, used to reference the global black and white list configuration. The global configuration is seen below in the `block-allow-list` configuration.
  block-allow-list: "bw-rule-1"


# Global black and white list configuration, referenced by each instance through the configuration item name.
block-allow-list:
  bw-rule-1:                              # Name
    do-dbs: ["db01","clover","test"]
    do-tables:                        # Whitelist of upstream tables to be migrated.
    - db-name: "test"              # The name of the database containing the table to be migrated.
      tbl-name: "k2"          # The name of the table to be migrated.
    - db-name: "db01"
      tbl-name: "*"
    - db-name: "clover"
      tbl-name: "*"

tiup dmctl --master-addr 10.70.20.57:8261 stop-task task1.yaml

tiup dmctl --master-addr 10.70.20.57:8261 operate-source stop source1.yaml

tiup dmctl --master-addr 10.70.20.57:8261 operate-source create source1.yaml

tiup dmctl --master-addr 10.70.20.57:8261 start-task task1.yaml

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

No errors, no data.

| username: Clover | Original post link

It still doesn’t work.

| username: TiDB_C罗 | Original post link

Check whether the user used by DM has the corresponding permissions for the source database.

| username: TiDB_C罗 | Original post link

Check the detailed information of the task.

| username: Clover | Original post link

There are permissions. It’s the root user, and it would result in an error if there were no permissions.

| username: Billmay表妹 | Original post link

Did you perform these checks before the migration? TiDB Data Migration 任务前置检查 | PingCAP 文档中心

| username: Clover | Original post link

Done. This is a bug.

| username: Fly-bird | Original post link

Configuration error

| username: Clover | Original post link

Where?

| username: dba-kit | Original post link

Check the permissions of the DM user on the upstream MySQL. Does it include the test database?

| username: dba-kit | Original post link

In terms of pure configuration, it is actually correct.

| username: Clover | Original post link

Yes, it’s written in the question.