Skip to main content

MySQL Amazon RDS Setup

This guide goes through the steps you need to take to create a MySQL resource using a MySQL database on Amazon RDS.

Requirements

  1. Configure Security Groups
  2. Configure Network ACLs (only if your database is within a VPC)
  3. Enable the Binary Log (only if using as an upstream resource)

Configure Security Groups

To allow access to your MySQL database from Meroxa IPs, follow these steps:

  1. Go to Amazon RDS in your AWS account.
  2. Go to Databases in the Amazon RDS menu.
  3. Click into the MySQL database you'd like to use with Meroxa.
  4. In the Connectivity & security section, under Security and VPC security groups, click your security group by clicking the blue hyperlink.
  5. You should now see a list of Security Groups, click into the selected security group by clicking the blue hyperlink under Security group ID.
  6. Under Inbound rules, click the Edit inbound rules button.
  7. Click the Add rule button.
  8. Set Protocol to TCP.
  9. Set Port to the port of your database. For MySQL it's 3306 by default.
  10. Set the Source to include the Meroxa IPs.

Configure Network ACLs

note

You only need to update this if your database is within a VPC.

To allow access to your MySQL database from Meroxa IPs, follow these steps:

  1. Go to Amazon RDS in your AWS account.
  2. Go to Databases in the Amazon RDS menu.
  3. Click into the MySQL database you'd like to create a replica of.
  4. In the Connectivity & security section, under Networking and VPC, click your VPC by clicking the blue hyperlink.
  5. You should now see a list of Your VPCs. Click into the selected VPC by clicking the blue hyperlink under VPC ID.
  6. In your VPC Details, click the blue hyperlink under Main network ACL.
  7. You should now see a list of Network ACLs. Click into the selected Network ACL by clicking the blue hyperlink under Network ACL ID.
  8. You will update both the Inbound and Outbound Rules of the Network ACL to contain ALL - 0.0.0.0/0 - ALLOW.
  9. If your Inbound and Outbound Rules do not contain ALL - 0.0.0.0/0 - ALLOW—update the Source to allow Meroxa IPs both Inbound and Outbound.

Enable Binary Log

With Binary Log enabled, Meroxa pulls records from MySQL by reading the Binary Log, which produces change events for row-level INSERT, UPDATE, and `DELETE operations and emits those change events into a stream.

note

Backups must be enabled for Binary Loging to be enabled in RDS.

Using an existing parameter group

If you would like to enable the Binary Log using an existing parameter group, follow these steps:

  1. Go to Amazon RDS in your AWS account.
  2. Go to Databases in the Amazon RDS menu.
  3. Click into the MySQL database you'd like to use with Meroxa.
  4. In the Configuration section, under Instance and click the blue hyperlink under Parameter group.
  5. Click the Edit parameters button.
  6. Search and set the following key/values in your DB parameter group:
    • binlog_format - ROW
    • binlog_row_image - FULL
  7. Click the Save changes button.

Using a new parameter group

If you would like to enable the Binary Log using a new parameter group, follow these steps:

  1. Go to Amazon RDS in your AWS account.
  2. Go to Parameter groups in the Amazon RDS menu.
  3. Click the Create parameter group button.
  4. Set Parameter group family to the MySQL version of your database (e.g., mysql8.0).
  5. Set Type to DB Parameter Group.
  6. Set Group name to an identifiable name.
  7. Click the Create button.
  8. You should now see a list of Parameter groups. Click into the parameter group you just created by clicking the blue hyperlink under Name.
  9. Click the Edit parameters button.
  10. Search and set the following key/values in your DB parameter group:
  • binlog_format - ROW
  • binlog_row_image - FULL
  1. Click the Save changes button.
  2. Go back to Databases in the Amazon RDS menu.
  3. Click into the MySQL database you'd like to use with Meroxa.
  4. Click the Modify button.
  5. Under the Additional configuration dropdown, look for DB parameter group and select your new parameter group.
  6. Click the Continue button.
  7. Under the Scheduling of modifications dialog, select Apply immediately.
  8. Click the Modify DB Instance button to confirm changes.
  9. Next, you must reboot the MySQL server and can do that by clicking on the Actions menu and clicking Reboot.
  10. You will be asked to confirm the reboot. Click the Confirm button.
  11. The Binary Log should now be enabled on your MySQL database.

What's Next?

Now that you've configured your MySQL Amazon RDS database instance, you are ready to create your MySQL resource!