Skip to content

Instantly share code, notes, and snippets.

@samklr samklr/binlog_rds.md
Last active Dec 20, 2018

Embed
What would you like to do?
Enabling RDS MySQL for Change Data Capture

Do this before you add any data to your instance.

For RDS : Create a Parameter Group with the following parameters changed :
- Set binlog_format = ROW
- Set binlog_row_image = FULL
- Set binlog_rows_query_log_events = ON (1)
- (Optional) Set max_allowed_packet = Max (Increase ...)

Once the instance is created with the above parameter group, you'll need to change retention time of the binlog
because AWS flushes the binary logs instantaneously.
To change that log into mysql :

mysql > call mysql.rds_set_configuration('binlog retention hours', 168);

Check that the value has changed :
mysql > call mysql.rds_show_configuration;

Now you should be able to read the event stream of your DB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.