Updated on 2025-07-22 GMT+08:00

Binlog

Binlogs record database table changes, including data insertion, update, and deletion, and DDL statements. If a database is faulty or a DML statement is incorrectly executed, DAS can parse the binlogs to restore data.

Prerequisites

  • You have created an RDS for MySQL instance.
  • You have enabled binlogs.

Procedure

  1. Log in to the Huawei Cloud console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner, and under Databases, click Data Admin Service.
  4. In the navigation pane, choose Intelligent O&M > Instance List.

    Alternatively, on the Overview page, click Go to Intelligent O&M.

  5. In the upper right corner of the Instance List page, search for instances by engine type, instance name, or instance IP.
  6. Locate the target instance and click Details.
  7. On the displayed page, click the Binlog tab.

    Figure 1 Binlog
    You can perform the following operations:
    • Archived Logs
      1. On the Archived Logs tab, you can view non-fragmented backup log files, which record database changes in the instance.
        Figure 2 Archived Logs
      2. You can specify Start and End Time to search for log files within a specified period.
      3. Click Parse Log to parse the binlog. Wait until the parsing is complete.
      4. After the status changes to Parsed, click View Details. Historical SQL operations are displayed. You can filter change records by start and end time, database name, table name, and operation type.
        Figure 3 Viewing log details
      5. Click View Data to view data change details of each record.
        Figure 4 Viewing data
      6. Click Delete Parsing Results to clear the log records.
      7. Click Export and select an OBS bucket to export a log file.
        Figure 5 Exporting log files
      8. Click View Export List to view the exported log file.
        Figure 6 View Export List
      9. On the View Export List page, click Download to download the log file to the local PC.
      10. On the View Export List page, click Delete to delete the log file.
      11. Open the downloaded log file and view event details, including the original SQL statement and rollback statement. Run the rollback statement in the development tool or other database connection tools to roll back the database changes and restore data. You need to roll back each operation from the latest event.
        Figure 7 Events
    • Latest Logs
      1. On the Latest Logs tab, you can view all binlog files of the instance.
        Figure 8 Latest Logs
      2. Click View Overview to view the type, server ID, location, and details of all events in a log file.
        Figure 9 Viewing the overview
      3. For details about other operations, see Archived Logs.