Updated on 2025-08-07 GMT+08:00

DRS Pre-Check Items

A DRS migration process consists of four phases: task startup, full migration, incremental migration, and task completion. A single full migration task contains three phases. To ensure smooth migration, DRS automatically scans and checks parameters and objects in the source and destination databases before starting a migration task. The following table lists common check items.

Overview

View pre-check items based on the source database type of your migration task.

  • The following lists the pre-check items for migration tasks with MySQL serving as the source.

MySQL->MySQL

Table 1 Pre-check items

Category

Check Item

Check Item Details

Permissions

Source database permissions

  • Full migration requires the following minimum permissions:

    SELECT, SHOW VIEW, and EVENT

  • Full+incremental migration requires the following minimum permissions:

    SELECT, SHOW VIEW, EVENT, LOCK TABLES, REPLICATION SLAVE, and REPLICATION CLIENT

  • The user must have the SELECT permission for mysql.user.

Destination database permissions

  • The destination database user must have the following permissions:

    SELECT, CREATE, ALTER, DROP, DELETE, INSERT, UPDATE, INDEX, EVENT, CREATE VIEW, CREATE ROUTINE, TRIGGER, REFERENCES, and WITH GRANT OPTION. If the destination database version is in the range 8.0.14 to 8.0.18, the SESSION_VARIABLES_ADMIN permission is required.

  • To migrate data, you must have the SELECT, INSERT, UPDATE, and DELETE permissions for the MySQL database.

Versions

Source database versions

Versions 5.5, 5.6, 5.7, and 8.0 are supported.

Destination database versions

Versions 5.5, 5.6, 5.7, and 8.0 are supported.

Migration version

The destination database version must be the same as or later than the source database version.

Parameters

GTID status

Enable GTID for the source database. If GTID is not enabled for the source database, primary/standby switchover is not supported. DRS tasks will be interrupted and cannot be restored during a switchover.

Performance parameters

Enable skip-name-resolve for the source database to reduce the possibility of connection timeout.

The log_slave_updates parameter of the source database must be enabled. Otherwise, the migration fails.

The binlog_row_image parameter value of the source database must be FULL. Otherwise, the migration fails.

Maximum size of a packet that can be transmitted

If there is a lot of data to be migrated or there are too many fields to be migrated, and the max_allowed_packet value of the source database is too small, the migration task may fail.

If there is a lot of data to be migrated or there are too many fields to be migrated, and the max_allowed_packet value of the destination database is too small, data cannot be written to the destination database and the full migration fails.

sql_mode value

If the MyISAM tables are included in the migration objects, the sql_mode value in the destination database cannot be no_engine_substitution. Otherwise, the migration fails.

Incremental migration

Binlog status

The binlog of the source database must be enabled and the row-based format must be used during incremental migration.

Binlog retention period

If the storage space is sufficient, store the source database binlog files as long as possible. The recommended retention period is three days. If you set the period to 0, the migration may fail.

  • If the source database is a self-managed MySQL database, set expire_logs_days to specify the binlog retention period. Set expire_logs_day to a proper value to ensure that the binlog does not expire before data transfer resumes. This ensures that services can be recovered after interruption.
  • If the source database is RDS for MySQL, set the binlog retention period by following the instructions provided in RDS User Guide.

server_id value

During an incremental migration, the server_id value of the MySQL source database must be set.

  • If the source database version is MySQL 5.6 or earlier, the value of server_id ranges from 2 to 4294967296.
  • If the source database version is MySQL 5.7 or later, the value of server_id ranges from 1 to 4294967296.

Session variables

During an incremental migration, if the session variable character_set_client is set to binary, some data may include garbled characters.

Destination database

Storage space

The destination DB instance must have sufficient storage space.

Status

The destination DB instance is running properly.

Consistency

Character set

The character set of the destination database must be the same as that of the source database.

Collation

The collation_server value of the destination database must be the same as that of the source database.

Time zone

The time_zone value of the destination database must be the same as that of the source database.

Case sensitive

The lower_case_table_names value of the destination database must be the same as that of the source database.

Transaction isolation level

The transaction isolation level of the destination database must be the same as that of the source database.

Maximum length of the calculation result of the group_concat function

The group_concat_max_len value of the destination database must be the same as that of the source database.

server_uuid parameter

The server_uuid values of the destination and source databases must be different.

InnoDB check mode

The innodb_strict_mode value of the destination database must be the same as that of the source database.

Data block encryption parameter

The block_encryption_mode value of the destination database must be the same as that of the source database.

SQL mode

The sql_mode value of the destination database must be the same as that of the source database.

Migration objects

Selected objects

  • Databases, tables, users, views, indexes, constraints, functions, stored procedures, triggers, and events can be migrated.
  • Only MyISAM and InnoDB tables can be migrated.
  • The system database and event statuses cannot be migrated.

Tables without primary keys

Create primary keys for tables as the performance of a table without a primary key is lower than that of a table with a primary key.

Associated objects

Associated objects must be migrated at the same time to avoid migration failure caused by missing associated objects.

Foreign key reference operations

Cascade operations cannot be performed on tables with foreign keys. If the foreign key index of a table is a common index, the table structure may fail to be created. You are advised to use a unique index.

Duplicate names

The destination DB instance cannot contain databases with the same name as the source databases (except the MySQL system database).

Table naming rules

  • The source database name, table name, and view name cannot contain non-ASCII characters or special characters '<>`/\"
  • The source database name cannot start with ib_logfile and cannot be ib_buffer_pool, ib_doublewrite, ibdata1 or ibtmp1.

Encrypted table check

If there are encrypted tables in the source database, check whether these tables are supported on the destination database. If the destination database does not support these tables, the task may fail.