This document is provided as an AI translation. If the translation differs from the original, the Korean original takes precedence.

Database > Database Migration Service > Endpoint

This document explains how to configure source database prerequisites and create and manage endpoints.

Endpoint

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:

  • Endpoint names can only contain between 1 and 100 uppercase and lowercase English letters, numbers, and certain symbols (-, _, .). The first character must be an English letter.

Billing

Endpoints are billed as follows:

  • Billing starts from the moment an endpoint is created.
  • Endpoints that are not used in any migration job are still billed until they are deleted, so delete any endpoints that are no longer needed.

Source Database Prerequisites

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.

MySQL

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

MariaDB

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

  • For the binary log retention period, check binlog_expire_logs_seconds first. If the value is 0, verify that expire_logs_days is set to 1 or more. On versions that do not support binlog_expire_logs_seconds, use expire_logs_days instead.
  • If the binary log retention period is too short, unread binary logs may be deleted while a migration job is paused or target replication is delayed, making it impossible to continue the migration. We recommend setting the retention period to at least 1 day.

DB Username Privileges

The DB user specified in the endpoint must have the following privileges for each DB engine.

MySQL

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'@'%';

MariaDB

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.

Settings for NHN Cloud RDS

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.
  • DB users created in the RDS console are not granted the BINLOG MONITOR privilege. If the source is RDS for MariaDB, you must use direct control to pass the source account privilege validation.
  • Without direct control, DB users only receive privileges for DB schemas created in the RDS console. If no DB schema exists in the target RDS DB Instance, DMS cannot create the database and the target account privilege validation will fail.

Signal Table Database

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.

Create Endpoint

On the Endpoint tab, click + Create Endpoint to go to the creation screen. The fields displayed vary depending on the endpoint type.

Source Endpoint

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.

Target Endpoint

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

  • The RDS DB Instance must be created in advance in the RDS service. The IP address of the migration instance must be allowed in the DB Security Group of the target RDS DB Instance.
  • We recommend setting the storage of the target RDS DB Instance to at least the size of the data in the source database.

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.

  • Enable Direct Control of DB Schema & User.
  • Pre-create a DB schema with the same name as the database to migrate.

For more information, see Settings for NHN Cloud RDS.

Endpoint List

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.

Endpoint Status

Status Description
Available The endpoint can be used in a migration job.
In Use The endpoint is currently being used in a migration job.

Modify Endpoint

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.

Delete Endpoint

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.

TOP