Amazon RDS MySQL
ON THIS PAGE
Amazon Relational Database Service (RDS) allows you to deploy scalable MySQL servers in minutes with cost-efficient and resizable hardware capacity. Amazon RDS for MySQL automates time-consuming administration tasks such as backups, software patching, monitoring, scaling, and replication.
You can ingest data from your Amazon RDS MySQL database using Hevo Pipelines and replicate it to a Destination of your choice.
- The Amazon RDS MySQL instance is running.
- Binary Log (BinLog) replication is enabled, if the Pipeline mode is BinLog.
- Hevo’s IP addresses are whitelisted.
- SELECT privileges are granted to the database user
Configuring MySQL Binary Logs for Replication
A binary log is a collection of log files that records information about data modifications and data object modifications made on a MySQL server instance. Typically binary logs are used for data replication and data recovery.
Hevo supports data ingestion for replication the from MySQL database via binary logs (BinLog). For this, binary logging must be enabled on your MySQL instance.
Note: To use binlog replication, your Amazon RDS MySQL database must be running MySQL v5.6 or higher.
To enable binary logging, follow these steps:
Step 1. Configure binary logging format as
- Open the Amazon RDS console.
- In the left navigation pane, select Databases (or Instances if you are using an older version).
In the Databases section on the right, select the DB instance that you want to connect.
Click the Configuration tab, and then, click the link text under Parameter Group to open its setting page.
Click Edit parameters.
Update the values of the parameters as follows:
Parameter Name Value
- Click Save changes.
In the Databases panel, select Reboot from the Actions drop-down to restart your Amazon RDS MySQL instance for the changes to take effect.
The replication reference guide on MySQL’s documentation portal provides a complete reference of the options available for replication and binary logging.
Step 2. Configure BinLog Retention Period
- Log in to your Amazon RDS MySQL database instance with
Run the following command to view the current BinLog retention period (in hours):
Note: The BinLog Retention period must be at least 72 hours.
Run the following command to set the retention period to at least 72 hours (three days).
call mysql.rds_set_configuration('binlog retention hours', 72);
Whitelisting Hevo’s IP Addresses
You need to whitelist the Hevo IP address for your region to enable Hevo to connect to your Amazon RDS MySQL database. To do this:
- Open the Amazon RDS console.
- In the left navigation pane, click Databases (or Instances if you are using an older version).
In the Databases section on the right, click the DB identifier of the Amazon RDS MySQL instance to configure a security group.
Note: The instance does not necessarily have to be a replica as long as it whitelists the region’s IP addresses.
In the Connectivity & security tab, click the link text under Security, VPC security groups to open the Security Groups panel.
In the Security Groups panel, click Inbound Rules, and then, Edit Inbound Rules.
In the Edit inbound rules page:
Click Add rule.
In the Port range column, enter the port of your Amazon RDS MySQL instance (Example: 3306).
In the Source column, select Custom from the drop-down and enter Hevo’s IP addresses for your region.
Click Save rules.
Repeat steps 6 in the Outbound Rules tab to configure Outbound Rules.
Granting Privileges to the User
Perform the following steps to grant
REPLICATION privileges to the database user:
Log into your Amazon RDS MySQL database instance as a user with
Run the following command to grant
REPLICATIONprivileges to the database user:
GRANT SELECT, REPLICATION CLIENT, REPLICATION SLAVE ON *.* TO <db_user_name>;
Grant privileges to the database user to read BinLog settings, if Pipeline mode is Binlog:
GRANT SELECT ON mysql.rds_configuration to <db_user_name>;
- Hevo does not fetch Views from the MySQL database automatically. As a workaround, you can create individual Pipelines in Custom SQL mode to fetch each View. However, some limitations may arise based on the type of data synchronisation, the query mode, or the number of Events. Contact Hevo Support for more details.