Database Migration Service supports one-time and continuous migrations from source databases to Cloud SQL destination databases.
Supported source databases for MySQL include:
Amazon RDS 5.6, 5.7, 8.0
Self-managed MySQL (on premises or on any cloud VM that you fully control) 5.5, 5.6, 5.7, 8.0
Cloud SQL 5.6, 5.7, 8.0
Amazon Aurora 5.6, 5.7, 8.0
To configure a source database, complete the following steps:
For Cloud SQL sources: If you are migrating from a Cloud SQL
instance that uses a Private IP connection to a Cloud SQL instance that uses a
non-RFC 1918 address
IP range, add the non-RFC 1918 range to the network configuration of your source Cloud SQL instance.
See Configure authorized networks
in Cloud SQL documentation.
Before you migrate data from the source database to the destination database,
make sure that you stop all Data Definition Language (DDL) write operations during the full dump phase.
You can use a script
to verify that DDL operations are stopped. After the migration is in the change data capture (CDC) phase, you can resume DDL operations.
For Amazon RDS, setting row-based configuration is done in the parameter group by configuring the binlog retention hours parameter. This parameter is used to specify how many hours Amazon RDS should retain binary log files.
To set the retention period for binary logs in Amazon RDS, use the mysql.rds_set_configuration stored procedure and specify a period with enough time for replication to occur. For example: