I want to turn on binary logging so that I can replicate an Amazon Aurora MySQL-Compatible Edition cluster to an external MySQL-compatible database. Or, create a replica across AWS Regions.
Resolution
By default, binary logging is turned off for Aurora MySQL-Compatible.
To confirm that binary logging is turned off on your DB cluster, run the following command:
mysql> show variables like 'log_bin';
Example output
+----------------+------------+
| Variable_name | Value |
+----------------+------------+
| log_bin | OFF |
+----------------+------------+
If binary logging is turned off, then turn on binary logging.
When you turn on binary logging, the recovery time for an unplanned restart can be longer. Aurora MySQL performs a full binary log recovery on the writer instance. The recovery time depends on your workload, the amount of logged data in the binary logs, and the binlog_format parameter format.
To confirm that binary logging is turned on, run the following command:
mysql> show variables like 'log_bin';
Example output:
+----------------+------------+
| Variable_name | Value |
+----------------+------------+
| log_bin | ON |
+----------------+------------+
Note: Unless you require a specific binlog format, set binlog_format to ROW. For MySQL version 8.0.34 and later, binlog_format is set to ROW by default.
To check the binlog format, run the following command:
mysql> show variables like 'binlog_format';
Example output:
+----------------+------------+
| Variable_name | Value |
+----------------+------------+
| binlog_format | ROW |
+----------------+------------+
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?
Binary logging formats on the MySQL website
binlog_format on the MySQL website