You can run the mysqlbinlog command to view specific SQL statements in the binary logs of an RDS for MySQL instance.


MySQL has been installed on your Linux-based on-premises host that runs a Linux operating system.


  1. Download data and log backup files on your Linux-based on-premises host that runs MySQL.
  2. Run the following command in the CLI:
    mysqlbinlog -vv --base64-output=decode-rows <Save path of binary files>
    • -vv: to view SQL statements and remarks.
    • --base64-output=decode-rows: to decode the content.


System errors

ERROR: Error in Log_event::read_log_event(): 'Sanity check failed', data_len: 151, event_type: 35
ERROR: Could not read entry at offset 120: Error in log format or read error.

If either of the preceding errors occurs, check the version of the used mysqlbinlog command. For example, if you use Version 3.3, these errors may occur. In such case, you can upgrade the command version.

Content errors

If you forget to enter --base64-output=decode-rows, the displayed content is not decoded, as shown in the following figure.