This step-by-step guide shows you how to configure Amazon Aurora MySQL to replicate data into ClickHouse Cloud using the MySQL ClickPipe. For common questions around MySQL CDC, see the MySQL FAQs page.Documentation Index
Fetch the complete documentation index at: https://private-7c7dfe99-page-updates.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Enable binary log retention
The binary log is a set of log files that contain information about data modifications made to a MySQL server instance, and binary log files are required for replication. To configure binary log retention in Aurora MySQL, you must enable binary logging and increase the binlog retention interval.
- Enable binary logging via automated backup
The automated backups feature determines whether binary logging is turned on or off for MySQL. Automated backups can be configured for your instance in the RDS Console by navigating to Modify > Additional configuration > Backup and selecting the Enable automated backups checkbox (if not selected already).
We recommend setting the Backup retention period to a reasonably long value, depending on the replication use case.
- Increase the binlog retention interval
By default, Aurora MySQL purges the binary log as soon as possible (i.e., lazy purging). We recommend increasing the binlog retention interval to at least 72 hours to ensure availability of binary log files for replication under failure scenarios. To set an interval for binary log retention (binlog retention hours), use the mysql.rds_set_configuration procedure:
Configure binlog settings
The parameter group can be found when you click on your MySQL instance in the RDS Console, and then navigate to the Configuration tab.Click the parameter group link, which will take you to its dedicated page. You should see an Edit button in the top right.
The following parameters need to be set as follows:
binlog_formattoROW.
binlog_row_metadatatoFULL.
binlog_row_imagetoFULL.
Then, click on Save Changes in the top right corner. You may need to reboot your instance for the changes to take effect — a way of knowing this is if you see
Pending reboot next to the parameter group link in the Configuration tab of the Aurora instance.
Enable GTID mode (recommended)
Global Transaction Identifiers (GTIDs) are unique IDs assigned to each committed transaction in MySQL. They simplify binlog replication and make troubleshooting more straightforward. We recommend enabling GTID mode, so that the MySQL ClickPipe can use GTID-based replication. GTID-based replication is supported for Amazon Aurora MySQL v2 (MySQL 5.7) and v3 (MySQL 8.0), as well as Aurora Serverless v2. To enable GTID mode for your Aurora MySQL instance, follow these steps:- In the RDS Console, click on your MySQL instance.
- Click on the Configuration tab.
- Click on the parameter group link.
- Click on the Edit button in the top right corner.
- Set
enforce_gtid_consistencytoON. - Set
gtid-modetoON. - Click on Save Changes in the top right corner.
- Reboot your instance for the changes to take effect.
Configure a database user
Connect to your Aurora 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
mysqldatabase. Repeat these commands for each database and host you want to replicate: -
Grant replication permissions to the user: