Using a MySQL compatible database as a target for homogeneous data migrations in Amazon DMS
You can use a MySQL compatible database as a migration target for homogeneous data migrations in Amazon DMS.
Amazon DMS requires certain permissions to migrate data into your target Amazon RDS for MySQL or MariaDB or Amazon Aurora MySQL database. Use the following script to create a database user with the required permissions in your MySQL target database.
CREATE USER '
your_user
'@'%' IDENTIFIED BY 'your_password
'; GRANT ALTER, CREATE, DROP, INDEX, INSERT, UPDATE, DELETE, SELECT, CREATE VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, EXECUTE, REFERENCES ON *.* TO 'your_user
'@'%'; GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'your_user
'@'%';
In the preceding example, replace each user input placeholder
with your own information.
Use the following script to create a database user with the required permissions in your MariaDB database. Run the GRANT queries for all databases that you migrate to Amazon.
CREATE USER '
your_user
'@'%' IDENTIFIED BY 'your_password
'; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, EXECUTE,SLAVE MONITOR, REPLICATION SLAVE ON *.* TO 'your_user'@'%';
In the preceding example, replace each user input placeholder
with your own information.
Note
In Amazon RDS, when you turn on automated backup for a MySQL/Maria database instance, you also turn on
binary logging. When these settings are enabled, your data migration task may fail with the following error
while creating secondary objects such as functions, procedures, and triggers on the target database. If
your target database has binary logging enabled, then set log_bin_trust_function_creators
to
true
in the database parameter group before starting the task.
ERROR 1419 (HY000): You don't have the SUPER privilege and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable)