This document explains how to configure source database prerequisites and create and manage endpoints.
An endpoint contains the information required to connect to the source or target database for migration. Endpoints are created separately from migration jobs, and a single endpoint can be reused across multiple migration jobs.
| Type | Description |
|---|---|
| SOURCE | The source database to migrate from. MySQL or MariaDB can be used, and it must be accessible over the network from the migration instance. |
| TARGET | The target database to migrate data to. Only RDS for MySQL or RDS for MariaDB on NHN Cloud can be used. |
Endpoint names are subject to the following constraints:
Endpoints are billed as follows:
DMS reads the binary log (binlog) from the source database to reflect changes to the target database. Before starting a migration job, the following settings are required on the source database for each DB engine. Whether these settings are configured is automatically checked when you validate the migration job.
| Variable | Value | Importance |
|---|---|---|
| log_bin | ON | Required |
| binlog_format | ROW | Required |
| binlog_row_image | FULL | Required |
| binlog_expire_logs_seconds or expire_logs_days | 86400 seconds (1 day) or more | Recommended |
| gtid_mode | ON | Recommended |
| enforce_gtid_consistency | ON | Recommended |
| Variable | Value | Importance |
|---|---|---|
| log_bin | ON | Required |
| binlog_format | ROW | Required |
| binlog_row_image | FULL | Required |
| binlog_expire_logs_seconds or expire_logs_days | 86400 seconds (1 day) or more | Recommended |
Because MariaDB always uses GTID, the gtid_mode and enforce_gtid_consistency settings are not required.
If the source is RDS for MariaDB, you must use Direct Control of DB Schema & User. For more information, see Settings for NHN Cloud RDS.
Note
The DB user specified in the endpoint must have the following privileges for each DB engine.
| Type | Required Privileges | Scope |
|---|---|---|
| SOURCE | SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT | Global |
| SOURCE | SELECT | Database or table to migrate |
| SOURCE | CREATE, INSERT, DELETE, DROP | Signal Table Database |
| TARGET | CREATE, INSERT, UPDATE, DELETE | Database to migrate |
The following is an example of creating a migration user in the source database.
CREATE USER 'dms'@'%' IDENTIFIED BY '{password}';
GRANT SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'dms'@'%';
GRANT SELECT ON `{database}`.* TO 'dms'@'%';
GRANT CREATE, INSERT, DELETE, DROP ON `{signal_database}`.* TO 'dms'@'%';
| Type | Required Privileges | Scope |
|---|---|---|
| SOURCE | SHOW DATABASES, REPLICATION SLAVE, BINLOG MONITOR | Global |
| SOURCE | SELECT | Database or table to migrate |
| SOURCE | CREATE, INSERT, DELETE, DROP | Signal Table Database |
| TARGET | CREATE, INSERT, UPDATE, DELETE | Database to migrate |
The following is an example of creating a migration user in the source database.
CREATE USER 'dms'@'%' IDENTIFIED BY '{password}';
GRANT SHOW DATABASES, REPLICATION SLAVE, BINLOG MONITOR ON *.* TO 'dms'@'%';
GRANT SELECT ON `{database}`.* TO 'dms'@'%';
GRANT CREATE, INSERT, DELETE, DROP ON `{signal_database}`.* TO 'dms'@'%';
Note
BINLOG MONITOR is the renamed version of the REPLICATION CLIENT privilege introduced in MariaDB 10.5. On versions earlier than MariaDB 10.5, grant the REPLICATION CLIENT privilege instead of BINLOG MONITOR.
Caution
Because DMS creates databases and tables directly in the target database, the CREATE privilege at the database scope or higher is required. A table-level privilege alone is not sufficient to create a database.
If the source or target database is an NHN Cloud RDS DB Instance, the following settings are required in the RDS console.
| Category | Required Setting |
|---|---|
| Source RDS for MariaDB | Direct Control of DB Schema & User must be enabled. |
| Target RDS for MySQL, RDS for MariaDB | One of the following must be configured. • Enable Direct Control of DB Schema & User. • Pre-create a DB schema with the same name as the database to migrate in the RDS console. |
The signal table is a table that DMS uses to control data replication from the source database. When creating a source endpoint, you must specify the source database in which the signal table will be created. DMS automatically creates the signal table in the specified database when a migration job starts, and deletes it when the job completes.
On the Endpoint tab, click + Create Endpoint to go to the creation screen. The fields displayed vary depending on the endpoint type.
| Item | Description |
|---|---|
| Endpoint Name | The name that identifies the endpoint. |
| Endpoint Type | Select SOURCE. |
| DB Engine | Select MySQL or MariaDB. |
| Connection Address | The IP address or domain of the source database. |
| DB Port | The port of the source database. Enter a value between 1024 and 65535. |
| DB Username | The user to connect to the source database. Enter between 1 and 32 characters. |
| DB Password | The password for the DB user. Enter between 1 and 100 characters. |
| Signal Table Database | The name of the source database in which to create the signal table. Enter between 1 and 64 characters. |
| Item | Description |
|---|---|
| Endpoint Name | The name that identifies the endpoint. |
| Endpoint Type | Select TARGET. |
| DB Engine | Select RDS for MySQL or RDS for MariaDB. |
| Region | The region where the target RDS DB Instance is located. |
| RDS Instance | Select the target RDS DB Instance. The connection address and port are automatically set based on the selected DB Instance. |
| DB Username | The user to connect to the target database. Enter between 1 and 32 characters. |
| DB Password | The password for the DB user. Enter between 1 and 100 characters. |
Note
Caution
One of the following must be configured in advance in the RDS console for the target RDS DB Instance. If not configured, the target account privilege check will fail during migration job validation.
For more information, see Settings for NHN Cloud RDS.
| Item | Description |
|---|---|
| Name | The endpoint name. |
| Type | SOURCE or TARGET. |
| DB Engine | The database engine. |
| DB Version | The database version. The source database displays as Unknown until the connection test is performed. |
| Region | The region where the target endpoint's RDS DB Instance is located. |
| Connection Address | The database connection address. |
| DB Port | The database port. |
| Status | The current status of the endpoint. |
Click an endpoint in the list to display its details at the bottom. On the Recent Events tab, you can check events that occurred for that endpoint.
| Status | Description |
|---|---|
| Available | The endpoint can be used in a migration job. |
| In Use | The endpoint is currently being used in a migration job. |
Select the endpoint to modify and click Modify. Only endpoints in the Available status can be modified. You can change all fields except the endpoint type. Enter the DB Password only if you want to change it.
Select the endpoint to delete and click Delete. You can select multiple endpoints to delete at once.
Caution
Endpoints in the In Use status cannot be modified or deleted. You must delete the associated migration job first.