How Do I use mysqlbinlog to Obtain Binlog Files?
Use an ECS-based instance as an example.
- Install the mysql client on the ECS. For details, see How Can I Install a MySQL Client?
TaurusDB is only compatible with MySQL Community Edition 8.0 or later. Do not install the client of a version earlier than 8.0.
- 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 mysqlbinlog and the database server are not on the same computer).
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot