[[["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-08-25 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)."]]