Stay organized with collections
Save and categorize content based on your preferences.
This page describes how to configure change data capture (CDC) to
stream data from an Amazon Aurora MySQL database to a supported destination,
such as BigQuery or Cloud Storage.
Create a parameter group
Launch your Amazon RDS Dashboard.
In the Navigation Drawer, click Parameter Groups.
Click Create Parameter Group. The Create Parameter Group page appears.
Use the following table to populate the fields of this page:
Field
Description
Parameter group family
Select the family that matches your database.
Type
Select DB Cluster Parameter Group.
Group name
Provide a name for the parameter group.
Description
Provide a description for the parameter group.
Click Create.
Select the checkbox to the left of your newly created parameter group.
Under Parameter group actions, click Edit.
Set the following parameter values:
For GTID-based replication:
Parameter
Value
binlog_format
ROW
log_bin_use_v1_row_events
1
read_only
0
net_read_timeout
3600
net_write_timeout
3600
wait_timeout
86400
expire-logs-days
7
binlog_row_image
FULL
max_allowed_packet
1G (recommended value)
log-replica-updates
1
enforce-gtid-consistency
ON
gtid_mode
ON
You can only set this
parameter to ON after you set enforce-gtid-consistency
to ON. In general, gtid_mode can have the following
values:
OFF
OFF_PERMISSIVE
ON_PERMISSIVE
ON
You can only change the values of the gtid_mode parameter one
step at a time. For example, if the current mode is set to OFF,
do the following:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eBefore setting up Change Data Capture (CDC) for an Amazon Aurora MySQL database, you must have an existing Aurora cluster and be connected to the Writer endpoint of your master database server.\u003c/p\u003e\n"],["\u003cp\u003eA new DB Cluster Parameter Group should be created via the Amazon RDS Dashboard, selecting the correct family and type, and defining a unique name and description for it.\u003c/p\u003e\n"],["\u003cp\u003eWithin the Parameter Group, certain values need to be adjusted like \u003ccode\u003ebinlog_format\u003c/code\u003e to \u003ccode\u003eROW\u003c/code\u003e for both GTID and binlog based replication, along with other specific settings that are recommended, before saving the changes.\u003c/p\u003e\n"],["\u003cp\u003eThe parameter group must be applied to your database instance via the Amazon RDS dashboard, with the backup retention period set to 7 days, and then applied immediately.\u003c/p\u003e\n"],["\u003cp\u003eTo ensure proper replication, the binary log retention period must be set to a minimum of 7 days (168 hours) using a MySQL command and a new user 'datastream' must be created with specific replication and execution privileges.\u003c/p\u003e\n"]]],[],null,["# Configure an Amazon Aurora MySQL database\n\nThe following sections cover how to configure CDC for an Amazon Aurora MySQL database.\n| Before configuring CDC for your Amazon Aurora MySQL database, make sure that you have an existing Aurora cluster and that you have connected to the Writer endpoint of your primary database server.\n\nCreate a parameter group\n------------------------\n\n1. Launch your Amazon RDS Dashboard.\n\n2. In the **Navigation Drawer** , click **Parameter Groups**.\n\n3. Click **Create Parameter Group** . The **Create Parameter Group** page appears.\n\n4. Use the following table to populate the fields of this page:\n\n5. Click **Create**.\n\n6. Select the checkbox to the left of your newly created parameter group.\n\n7. Under **Parameter group actions** , click **Edit**.\n\n8. Set the following parameter values:\n\n - For **GTID-based** replication:\n\n - For **binlog-based** replication:\n\n9. Click **Save Changes**.\n\nAssign the parameter group to the database instance\n---------------------------------------------------\n\n1. Launch your Amazon RDS Dashboard.\n\n2. In the **Navigation Drawer** , click **Databases**, and then select your database instance.\n\n3. From the **Instance Actions** menu, select **Modify** . The **Modify DB Instance** dialog appears.\n\n4. In the **Additional configuration** section, select the database cluster parameter group that you [created](#create-a-parameter-group-aurora).\n\n5. Set the **Backup retention period** to **7 days**.\n\n6. Click **Continue**.\n\n7. In the **Scheduling of Modifications** pane, select the **Apply immediately** option.\n\nSet the binary log retention period\n-----------------------------------\n\n1. Enter the following MySQL command:\n\n ```sql\n call mysql.rds_set_configuration('binlog retention hours', 168);\n ```\n | You're entering this command because you want to ensure proper replication by configuring your system to retain binary logs for a minimum of 7 days (or 168 hours).\n2. Restart your MySQL server so that the changes you made can take effect.\n\nCreate a Datastream user\n------------------------\n\n1. Create a Datastream user:\n\n ```sql\n CREATE USER 'datastream'@'%' IDENTIFIED BY '\u003cvar translate=\"no\"\u003eYOUR_PASSWORD\u003c/var\u003e';\n ```\n2. Grant the following privileges to them:\n\n ```sql\n GRANT REPLICATION SLAVE, SELECT, REPLICATION CLIENT ON *.* TO 'datastream'@'%';\n GRANT EXECUTE ON PROCEDURE mysql.rds_show_configuration TO 'datastream'@'%';\n FLUSH PRIVILEGES;\n ```\n\nWhat's next\n-----------\n\n- Learn more about how Datastream works with [MySQL sources](/datastream/docs/sources-mysql)."]]