Help Center/ GaussDB(for MySQL)/ FAQs/ Log Management/ How Do I Enable and View Binlog of My GaussDB(for MySQL) Instance?
Updated on 2023-10-19 GMT+08:00

How Do I Enable and View Binlog of My GaussDB(for MySQL) Instance?

Enabling Binlog

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page, choose Database > GaussDB(for MySQL).
  4. Click the instance name to go to the Basic Information page.
  5. In the navigation pane on the left, choose Parameters.
  6. Enter log-bin in the search box and click the search button. Locate the displayed parameter, select ON from the Value drop-down list. Click Save above the parameter list.
  7. Reboot the instance for the modification to take effect.

Viewing Binlog Files

  1. Connect to an instance.
  2. Run the following command to view binlog files:

    SHOW BINLOG EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count];

    If a message indicating that the account permissions are insufficient, use the root account.

Impact of Enabling Binlog on GaussDB(for MySQL) Performance

Enabling binlog does not affect SELECT operations, but affects INSERT, UPDATE, DELETE and other write operations.

There are no significant differences between GaussDB(for MySQL) binlog and open-source MySQL binlog. The binlog syntax of GaussDB(for MySQL) is fully compatible with that of the open-source MySQL.