Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
11 changes: 10 additions & 1 deletion dm/dm-compatibility-catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,16 @@ In versions earlier than v8.5.6, DM creates foreign key constraints in the downs
### MariaDB notes

- For MariaDB **10.5.11 and later**, the DM **precheck fails** due to privilege name changes (for example, `BINLOG MONITOR`, `REPLICATION SLAVE ADMIN`, `REPLICATION MASTER ADMIN`). The error appears as `[code=26005] fail to check synchronization configuration` in the replication privilege, dump privilege, and dump connection number checkers.
- You can **bypass the precheck** by adding `ignore-checking-items: ["all"]` in the DM task. See [DM precheck](/dm/dm-precheck.md) for details.
- For DM v8.5.6, bypass only the affected prechecks by adding the following items to the DM task:

```yaml
ignore-checking-items:
- replication_privilege
- dump_privilege
- conn_number
```

Before using this workaround, manually verify the corresponding privileges and connection limit. For more information, see [Upstream database user privileges](/dm/dm-worker-intro.md#upstream-database-user-privileges) and [DM precheck](/dm/dm-precheck.md).

## Target databases

Expand Down
1 change: 1 addition & 0 deletions dm/dm-precheck.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ Prechecks can find potential risks in your environments. It is not recommended t
| :-------------------------- | :------------ |
| `dump_privilege` | Checks the dump privilege of the user in the upstream MySQL instance. |
| `replication_privilege` | Checks the replication privilege of the user in the upstream MySQL instance. |
| `conn_number` | Checks the available connections for the dump stage in the upstream database and for the load stage in the downstream database. Connections for incremental replication are not checked. |
| `version` | Checks the version of the upstream database. |
| `server_id` | Checks whether server_id is configured in the upstream database. |
| `binlog_enable` | Checks whether binlog is enabled in the upstream database. |
Expand Down
17 changes: 11 additions & 6 deletions migrate-from-mariadb.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ Perform the following steps to migrate data from MariaDB to TiDB:
tiup dumpling --port 3306 --host 127.0.0.1 --user root --password secret -F 256MB -o /data/backup
```

3. Restore the data by using the `tiup tidb-lightning` command. For more information about how to configure TiDB Lightning and how to run it, see [Get Started with TiDB Lightning](/get-started-with-tidb-lightning.md).
3. Restore the data by using the `tiup tidb-lightning` command. For a test or trial environment, see [Get Started with TiDB Lightning](/get-started-with-tidb-lightning.md). For production migration planning and configuration, see [Migrate Large Datasets from MySQL to TiDB](/migrate-large-mysql-to-tidb.md).

4. Migrate user accounts and permissions. For more information about how to migrate your users and permissions, see [Export users and grants](#export-users-and-grants).

Expand All @@ -374,19 +374,24 @@ To use DM, you need to deploy a set of DM services either with a [TiUP cluster](

Enable binlog on MariaDB and set `binlog_format=ROW`, `binlog_row_image=FULL`, and `binlog_legacy_event_pos=ON`. Also set `binlog_annotate_row_events=OFF` and `log_bin_compress=OFF`.

You also need an account with the `SUPER` permission or with the `BINLOG MONITOR` and `REPLICATION MASTER ADMIN` permissions. This account also needs read permission for the schemas you are going to migrate.
You also need an account with the privileges required by your MariaDB version. For the version-specific privilege requirements, see [Upstream database user privileges](/dm/dm-worker-intro.md#upstream-database-user-privileges). The account also needs read permission for the schemas you are going to migrate.

If you are not using an account with the `SUPER` permission, then you might have to add the following to the DM configuration, because TiDB does not yet know how to check for MariaDB specific permissions.
Because MariaDB reports some privileges differently from MySQL, `dmctl check-task` might report privilege errors even when the account has the required privileges. For DM v8.5.6, if the precheck returns `[code=26005] fail to check synchronization configuration` for the replication privilege, dump privilege, or dump connection number check, add only the following items to the task configuration file:

```yaml
ignore-checking-items: ["replication_privilege"]
ignore-checking-items:
- replication_privilege
- dump_privilege
- conn_number
```

Before you use DM to migrate data from upstream to downstream, a precheck helps detect errors in the upstream database configurations and ensures that the migration goes smoothly. For more information, see [Migration Task Precheck](/dm/dm-precheck.md)
Before using this workaround, manually verify the corresponding privileges and connection limit.

Before you use DM to migrate data from upstream to downstream, a precheck helps detect errors in the upstream database configurations and ensures that the migration goes smoothly. For more information, see [Migration Task Precheck](/dm/dm-precheck.md).
Comment thread
lilin90 marked this conversation as resolved.
Resolved

### Step 2. Replicate data

Follow the [Quick Start Guide for TiDB Data Migration](/dm/quick-start-with-dm.md) to replicate your data from MariaDB to TiDB.
For a test or development environment, follow the [Quick Start Guide for TiDB Data Migration](/dm/quick-start-with-dm.md) to replicate your data from MariaDB to TiDB. For production deployments, see [Deploy a DM Cluster Using TiUP](/dm/deploy-a-dm-cluster-using-tiup.md). After deployment, follow [Migrate Data Using Data Migration](/dm/migrate-data-using-dm.md) to create a source and configure and start a migration task.

Note that it is not required to first copy the initial data as you would do with MariaDB to MariaDB replication, DM will do this for you.

Expand Down
Loading