Menu
AWS Database Migration Service
User Guide (Version API Version 2016-01-01)

Using a MySQL-Compatible Database as a Target for AWS Database Migration Service

You can migrate data to MySQL databases using AWS DMS, either from another MySQL database or from one of the other supported databases.

MySQL versions 5.5, 5.6, and 5.7, as well as MariaDB and Aurora MySQL, are supported.

Prerequisites for Using a MySQL-Compatible Database as a Target for AWS Database Migration Service

Before you begin to work with a MySQL database as a target for AWS DMS, make sure that you have the following prerequisites:

  • A MySQL account with the required security settings. For more information, see Security Requirements When Using MySQL as a Target for AWS Database Migration Service.

  • A MySQL database with the tables that you want to replicate accessible in your network. AWS DMS supports the following MySQL editions:

    • MySQL Community Edition

    • MySQL Standard Edition

    • MySQL Enterprise Edition

    • MySQL Cluster Carrier Grade Edition

    • MariaDB

    • Amazon Aurora MySQL

  • During a load, you should consider disabling foreign keys. In order to disable foreign key checks on a MySQL-compatible database during a load, you can add the following command to the Extra Connection Attributes in the Advanced section of the target MySQL, Aurora MySQL, MariaDB endpoint connection information:

    Copy
    initstmt=SET FOREIGN_KEY_CHECKS=0

Limitations on Using MySQL as a Target for AWS Database Migration Service

When using a MySQL database as a target, AWS DMS doesn't support the following:

  • The DDL statements Truncate Partition, Drop Table, and Rename Table.

  • Using an ALTER TABLE <table_name> ADD COLUMN <column_name> statement to add columns to the beginning or the middle of a table.

In addition, when you update a column's value to its existing value, MySQL returns a 0 rows affected warning. In contrast, Oracle performs an update of one row in this case. The MySQL result generates an entry in the awsdms_apply_exceptions control table and the following warning:

Copy
Some changes from the source database had no impact when applied to the target database. See awsdms_apply_exceptions table for details.

Security Requirements When Using MySQL as a Target for AWS Database Migration Service

When using MySQL as a target for data migration, you must provide MySQL account access to the AWS DMS user account. This user must have read/write privileges in the MySQL database.

To create the necessary privileges, run the following commands:

Copy
CREATE USER '<user acct>'@'%' IDENTIFIED BY <user password>'; GRANT ALTER, CREATE, DROP, INDEX, INSERT, UPDATE, DELETE, SELECT ON myschema.* TO '<user acct>'@'%'; GRANT ALL PRIVILEGES ON awsdms_control.* TO '<user acct>'@'%';