Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dm/dm-precheck.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ For the full data migration mode (`task-mode: full`), in addition to the [common

- SELECT permission on INFORMATION_SCHEMA and dump tables
- RELOAD permission if `consistency=flush`
Comment thread
qiancai marked this conversation as resolved.
Outdated
- LOCK TABLES permission on the dump tables if `consistency=flush/lock`
- LOCK TABLES permission on the dump tables if `consistency=lock`, or if `consistency=auto` and the source is a managed MySQL service (such as Amazon RDS or Aurora) where `FLUSH TABLES WITH READ LOCK` is restricted
Comment thread
alastori marked this conversation as resolved.
Outdated

* (Mandatory) Consistency of upstream MySQL multi-instance sharding tables

Expand Down
5 changes: 5 additions & 0 deletions dm/dm-worker-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,16 @@ The upstream database (MySQL/MariaDB) user must have the following privileges:
| `REPLICATION SLAVE` | Global |
| `REPLICATION CLIENT` | Global |

> **Note:** If migrating from a managed MySQL service (such as Amazon RDS or Aurora) where `FLUSH TABLES WITH READ LOCK` is restricted, the user also needs the `LOCK TABLES` privilege. DM's default `consistency=auto` mode falls back to `LOCK TABLES` for data consistency when FTWRL is unavailable.

If you need to migrate the data from `db1` to TiDB, execute the following `GRANT` statement:

```sql
GRANT RELOAD,REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'your_user'@'your_wildcard_of_host';
GRANT SELECT ON db1.* TO 'your_user'@'your_wildcard_of_host';

-- For managed MySQL (Amazon RDS, Aurora, etc.), also grant:
-- GRANT LOCK TABLES ON db1.* TO 'your_user'@'your_wildcard_of_host';
```

If you also need to migrate the data from other databases into TiDB, make sure the same privileges are granted to the user of the respective databases.
Expand Down
4 changes: 4 additions & 0 deletions dm/quick-start-with-dm.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ You can use Docker to quickly deploy a test MySQL 8.0 instance.
GRANT PROCESS, BACKUP_ADMIN, RELOAD, REPLICATION SLAVE, REPLICATION CLIENT, SELECT ON *.* TO 'tidb-dm'@'%';
```

> **Note:** If your MySQL source is a managed service (such as Amazon RDS or Aurora), also grant `LOCK TABLES`. See [DM-worker privileges](/dm/dm-worker-intro.md#upstream-database-user-privileges) for details.

4. Create sample data:

```sql
Expand Down Expand Up @@ -148,6 +150,8 @@ On macOS, you can quickly install and start MySQL 8.0 locally using [Homebrew](h
GRANT PROCESS, BACKUP_ADMIN, RELOAD, REPLICATION SLAVE, REPLICATION CLIENT, SELECT ON *.* TO 'tidb-dm'@'%';
```

> **Note:** If your MySQL source is a managed service (such as Amazon RDS or Aurora), also grant `LOCK TABLES`. See [DM-worker privileges](/dm/dm-worker-intro.md#upstream-database-user-privileges) for details.

6. Create sample data:

```sql
Expand Down
Loading