By using AWS re:Post, you agree to the AWS re:Post Terms of Use

How do I turn on binary logging for my Aurora MySQL-Compatible cluster?

2 minute read
0

I want to replicate an Amazon Aurora MySQL-Compatible Edition cluster to an external MySQL-compatible DB. Or, I want to create a replica across AWS Regions.

Resolution

To replicate to a cluster to an external MySQL-compatible DB, or to create a cross-Region replica, turn on binary logging for your DB cluster. By default, Aurora MySQL has binary logging turned off. To check if binary logging is off on your DB instance, run the following command:

mysql> show variables like 'log_bin';+----------------+------------+
| Variable_name  | Value      |
+----------------+------------+
| log_bin        | OFF        |
+----------------+------------+

Note: When binary logging is turned on for Aurora, the recovery time after a crash can be longer. Aurora performs a full binary log recovery on the writer instance. The duration of an unplanned restart depends on the amount of logged data in the binary logs and the format of the binlog_format parameter. The duration also depends on your workload.

If binary logging is off, then turn on binary logging.

Note: Unless you require a specific binlog format, set binlog_format to MIXED.

To confirm that binary logging is now turned on, run the following commands:

mysql> show variables like 'log_bin';+----------------+------------+
| Variable_name  | Value      |
+----------------+------------+
| log_bin        | ON         |
+----------------+------------+
mysql> show variables like 'binlog_format';+----------------+------------+
| Variable_name  | Value      |
+----------------+------------+
| binlog_format  | STATEMENT  |
+----------------+------------+

Related information

Managing an Amazon Aurora DB cluster

How do I identify which Amazon RDS DB parameters are in custom parameter groups and which are in default parameter groups?

7.4.4.1 Binary logging formats on the MySQL website

AWS OFFICIAL
AWS OFFICIALUpdated 22 days ago