In apsaradb RDS for MySQL, you can use SQL Explorer, binlogs, or DTS to view incremental data. The following are details of different viewing methods.
Binary log (binlog)
Binlogs can accurately record all add, delete, and modify operations in the database, allowing you to accurately restore incremental data. The Binlog for RDS is stored in the instance first. The system regularly uploads the Binlog to OSS for backup, and then clears the Binlog in the instance. as described in the following sections.
- Log on to the ApsaraDB for RDS console .
- In the top navigation bar, select the region where the target RDS instance resides.
- Click the ID of the target instance.
- In the left-side navigation pane, choose download, and then click copy public network address. . To locate a Binlog file, click
- In the Linux where MySQL is installed, run the following command to download the Binlog file:
wget -c '[$Binlog_Address]'Note [$Binlog_Address] is the external download URL of Binlog files.
- Run the following command to convert the file to a readable format:
mysqlbinlog --no-defaults -v --base64-output=decode-rows [$Binlog_File] > binlog.sqlNote [$Binlog_File] is the name of a Binlog file.
- In the current directory of log files, run the following command to view the log:
more binlog.sqlNote You can also export log files to locate problems.
DTS Data Subscription
The data subscription function of DTS can push incremental data in RDS to users in real time. The user can customize incremental data, and can choose the schema of some tables or the incremental data to subscribe to. For more information about change tracking, see Change tracking (new).