Required settings

  • Host name
  • Port (default is 3306)
  • Service account
  • Database name
    • Database with binlog_format set to row
    • Database with binlog retention hours set to at least 24 hours

Creating a service account

CREATE USER 'artie_transfer' IDENTIFIED BY 'password';
GRANT SELECT, RELOAD, REPLICATION CLIENT, REPLICATION SLAVE ON *.* TO
    'artie_transfer';

-- If you are using AWS RDS or Aurora
CALL mysql.rds_set_configuration('binlog retention hours', 24);
-- If you are using Azure
SET GLOBAL binlog_expire_logs_seconds = 604800;
-- You do not need to explicitly set this for Google CloudSQL or Generic MySQL`;

Enabling binlog (Amazon Aurora or RDS)

To enable binary logging, you will need to update your RDS instance’s parameter group.

To create a new parameter group: navigate to RDS > Parameter groups > click Create.

For Aurora clusters, please ensure that you are creating this parameter group as DB cluster parameter group.

RDS Parameter Group

Once the parameter group is created, navigate to the parameter group and search for binlog_format. Update the value to ROW. MySQL Binlog Format

After updating the parameter group, you will need to restart your database so the changes can be picked up.

Setting a retention period for binlogs

The default value for binlog retention hours is NULL, which means they are not retained. We recommend setting this to a value that is at least 24 hours.

-- Setting binlog retention to 24 hours
CALL mysql.rds_set_configuration('binlog retention hours', 24);