Options for mariadb-binlog & mysqlbinlog in MariaDB Enterprise Server 10.6
mariadb-binlog utility is the newer name for
mysqlbinlog, though you can still run it using either name.
Determine when the output statements should be base64-encoded BINLOG statements: ‘never’ neither prints base64 encodings nor verbose event data, and will exit on error if a row-based event is found. 'decode-rows' decodes row events into commented SQL statements if the --verbose option is also given. ‘auto’ outputs base64 encoded entries for row-based and format description events. If no option is given at all, the default is ‘auto', and is consequently the only option that should be used when row-format events are processed for re-execution.
The maximum size of a row-based binary log event in bytes. Rows will be grouped into events smaller than this size if possible. This value must be a multiple of 256.
Directory for character set files.
List entries for just this database (local log only).
Check memory and open file usage at exit .
Print some debug info at exit.
Default authentication client-side plugin to use.
Read this file after the global files are read.
Only read default options from the given file #.
Additionally read default groups with # appended as a suffix.
Disable binary log. This is useful, if you enabled --to-last-log and are sending the output to the same MariaDB server. This way you could avoid an endless loop. You would also like to use it when restoring after a crash to avoid duplication of the statements you already have. NOTE: you will need a SUPER privilege to use this option.
Flashback feature can rollback you committed data to a special time point.
Force if binlog was not closed properly. (Defaults to on; use --skip-force-if-open to disable.)
Force reading unknown binlog events.
Display this help and exit.
Augment output with hexadecimal and ASCII event dump.
Get the binlog from server.
Prepare local temporary files for LOAD DATA INFILE in the specified directory.
Don't read default options from any option file.
Skip the first N entries.
Used to reserve file descriptors for use by this program.
Password to connect to remote server.
Directory for client-side plugins.
Port number to use for connection or 0 for default to, in order of preference, my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default (3306).
Print the program argument list and exit.
Print row counts for each row events (Defaults to on; use --skip-print-row-count to disable.)
Print row event positions (Defaults to on; use --skip-print-row-event-positions to disable.)
Print metadata stored in Table_map_log_event
The protocol to use for connection (tcp, socket, pipe).
Requires -R. Output raw binlog data instead of SQL statements. Output files named after server logs.
Read binary logs from a MariaDB server.
Direct output to a given file. With --raw this is a prefix for the file names.
Updates to a database with a different name than the original. Example: rewrite-db='from->to'.
Extract only binlog entries created by the server having the given id.
Add 'SET NAMES character_set' to the output.
Just show regular queries: no extra info, no row-based events and no row counts. This is mainly for testing only, and should not be used to feed to the MariaDB server. If you want to just suppress base64-output, you can instead use --base64-output=never
Don't print Annotate_rows events stored in the binary log.
The socket file to use for connection.
Enable SSL for connection (automatically enabled with other flags).
CA file in PEM format (check OpenSSL docs, implies --ssl).
CA directory (check OpenSSL docs, implies --ssl).
X509 cert in PEM format (implies --ssl).
SSL cipher to use (implies --ssl).
Certificate revocation list (implies --ssl).
Certificate revocation list path (implies --ssl).
X509 key in PEM format (implies --ssl).
Verify server's "Common Name" in its cert against hostname used when connecting. This option is disabled by default.
Start reading the binlog at first event having a datetime equal or posterior to the argument; the argument must be a date and time in the local time zone, in any format accepted by the MariaDB server for DATETIME and TIMESTAMP types, for example: 2004-12-25 11:25:56 (you should probably use quotes for your shell to set it properly).
Start reading the binlog at position N. Applies to the first binlog passed on the command line.
Stop reading the binlog at first event having a datetime equal or posterior to the argument; the argument must be a date and time in the local time zone, in any format accepted by the MariaDB server for DATETIME and TIMESTAMP types, for example: 2004-12-25 11:25:56 (you should probably use quotes for your shell to set it properly).
Wait for more data from the server instead of stopping at the end of the last log. Implies --to-last-log.
The slave server_id used for --read-from-remote-server --stop-never.
Stop reading the binlog at position N. Applies to the last binlog passed on the command line.
List entries for just this table (local log only).
TLS protocol version for secure connection.
Requires -R. Will not stop at the end of the requested binlog but rather continue printing until the end of the last binlog of the MariaDB server. If you send the output to the same MariaDB server, that may lead to an endless loop.
Connect to the remote server as username.
Reconstruct SQL statements out of row events. -v -v adds comments on column data types.
Verify checksum binlog events.
Print version and exit.