Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.

On this page

Show all

Help Center/ TaurusDB/ Troubleshooting/ Backup and Restoration Issues/ How Do I use mysqlbinlog to Obtain Binlog Files?

How Do I use mysqlbinlog to Obtain Binlog Files?

Updated on 2023-10-19 GMT+08:00

Use an ECS-based instance as an example.

  1. Install a MySQL client on the ECS. For details, see How Can I Install the MySQL Client?
    NOTE:

    GaussDB(for MySQL) is only compatible with MySQL 8.0 or later.

  2. Download binlog files.

    mysqlbinlog -hxxx -uxxx -Pxxx -pxxx binlog.xxxx --read-from-remote-server

    Common mysqlbinlog parameters:

    • -h: database host.
    • -u: username.
    • -P: port number.
    • -p: password.
    • --start-position: position where the decoding starts.
    • --start-datetime: time when the decoding starts.
    • --stop-position: position where the decoding stops.
    • --stop-datetime: time where the decoding stops.
    • --skip-gtids: gtid_log_event is not printed.
    • --short-form: Only statements are displayed.
    • --result-file: The SQL file that binlog decoding results are written to.
    • --read-from-remote-server: Binary logs are read from a remote server (It is available only when mysqlbinlogs and the database server are not on the same computer).
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback