Skip to main content Skip to complementary content

Prerequisites

Before using Amazon RDS for MySQL as an endpoint in a Replicate task, make sure the prerequisites outlined below have been met.

Driver prerequisites

Replicate on Windows

Install MySQL ODBC Unicode Driver 64-bit version 8.0.32 on the Replicate machine.

Replicate on Linux

  1. Stop the Replicate service and optionally confirm that it has stopped as described in Replicate server procedures.

  2. Install MySQL ODBC Unicode Driver 64-bit version 8.0.32 on the Replicate machine.
  3. Change the working directory to <Replicate-Install-Dir>/bin.

  4. Copy the driver location to the site_arep_login.sh file:

    echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/lib64" >> site_arep_login.sh

    This will add the driver to "LD_LIBRARY_PATH" and update the driver location in the site_arep_login.sh file.

  5. Optionally, confirm that the driver location was copied:

    cat site_arep_login.sh
  6. Make sure that the /etc/odbcinst.ini file contains an entry for MySQL, as in the following example:

    [MySQL ODBC 8.0 Unicode Driver]

    Driver = /usr/lib64/libmyodbc8w.so

    UsageCount = 1

  7. Start the Replicate service and optionally confirm that it has started as described in Replicate server procedures.

Amazon RDS for MySQL replication

Replication enables data from one Amazon RDS for MySQL database server (the primary server) to be copied to one or more Amazon RDS for MySQL database servers (the secondary servers).

Data can be ingested from either a primary server or a secondary server.

To replicate changes from a secondary server (CDC), the binary logging parameter log_slave_updates needs to be set to true (1).

Setting up Amazon RDS for MySQL for CDC (Change Data Capture)

To set up Amazon RDS for MySQL or Amazon Aurora for MySQL for CDC:

  1. Follow the instructions in the AWS Help for creating a new Parameter Group (see the Binary Logging Format section).

  2. When creating the new Parameter Group, set: binlog_format=row

  3. Save the new Parameter Group.
  4. If you have an existing instance of Amazon RDS for MySQL, edit the instance to use the parameter specified in Step 2 above. If you are provisioning a new instance of Amazon RDS for MySQL, reference the new Parameter Group created in Step 1 above.
  5. Finally, make sure that automated backup is enabled (the default).

Further reading: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.MySQL.BinaryFormat.html

Supported authentication methods

To be able to capture changes, the user's database account should be set up to use either SHA-256 pluggable authentication (sha256_password) or caching SHA-2 pluggable authentication (caching_sha2_password).

Replicating 4-byte UTF8 emojis

Replication of 4-byte UTF8 emojis to certain targets requires the following preparation:

  • Microsoft SQL Server Target: Transform the emojis from WSTRING(n) to WSTRING(n*2).
  • Amazon Redshift Target: Transform the emojis from WSTRING(n) to WSTRING(n*2).

For information on defining transformations, see Using the Transform tab.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!