How can I download binary logs from an Amazon RDS MySQL DB instance?

Last updated: 2020-03-26

How can I download binary logs from an Amazon Relational Database Service (Amazon RDS) MySQL DB instance?

Resolution

1.    Install the mysqlbinlog utility on your client machine, if you haven't already:

sudo yum install -y mysql

2.    Connect to your RDS DB instance from the MySQL client.

3.    Run the show binary logs command on the RDS DB instance, and review the output. You receive an output similar to the following that includes a list of the binary logs that are present on the RDS DB instance:

mysql> show binary logs;
+----------------------------+-----------+
| Log_name                   | File_size |
+----------------------------+-----------+
| mysql-bin-changelog.068462 |       729 |
| mysql-bin-changelog.068463 |       578 |
| mysql-bin-changelog.068464 |       578 |
| mysql-bin-changelog.068465 |       154 |
+----------------------------+-----------+
4 rows in set (0.00 sec)

3.    Access the MySQL binary logs to download or stream the logs from your RDS DB instance.


Did this article help you?

Anything we could improve?


Need more help?