RDS MySQL source setup guide
This is a step-by-step guide on how to configure your RDS MySQL instance for replicating its data via the MySQL ClickPipe.
Enable binary log retention
The binary log is a set of log files that contain information about data modifications made to an MySQL server instance, and binary log files are required for replication. Both of the below steps must be followed:
1. Enable binary logging via automated backup
The automated backups feature determines whether binary logging is turned on or off for MySQL. It can be set in the AWS console:
Setting backup retention to a reasonably long value depending on the replication use-case is advisable.
2. Binlog retention hours
The default value of binlog retention hours is NULL. For RDS for MySQL, NULL means binary logs aren't retained. To specify the number of hours to retain binary logs on a DB instance, use the mysql.rds_set_configuration with a period with enough time for replication to occur:
If not already configured, make sure to set these in the parameter group:
binlog_format
toROW
.binlog_expire_logs_seconds
to a value >=86400
(1 day).binlog_row_metadata
toFULL
binlog_row_image
toFULL
If you have a MySQL cluster, the above parameters would be found in a DB Cluster parameter group and not the DB instance group.
Configure a database user
Connect to your RDS MySQL instance as an admin user and execute the following commands:
-
Create a dedicated user for ClickPipes:
-
Grant schema permissions. The following example shows permissions for the
mysql
database. Repeat these commands for each database and host you want to replicate: -
Grant replication permissions to the user:
Configure network access
IP-based access control
If you want to restrict traffic to your RDS instance, please add the documented static NAT IPs to the Inbound rules
of your RDS security group.
Private access via AWS PrivateLink
To connect to your RDS instance through a private network, you can use AWS PrivateLink. Follow our AWS PrivateLink setup guide for ClickPipes to set up the connection.