/usr/bin/mysqlbinlog: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb-binlog' instead
/usr/bin/mysqlbinlog from 13.0.2-MariaDB, client 3.5 for Linux (x86_64)
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Dumps a MariaDB binary log in a format usable for viewing or for piping to
the mysql command line client.
Usage: /usr/bin/mysqlbinlog [options] log-files
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
The following groups are read: mysqlbinlog mariadb-binlog client client-server client-mariadb
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit.
--no-defaults Don't read default options from any option file.
The following specify which files/extra groups are read (specified before remaining options):
--defaults-file=# Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.
--defaults-group-suffix=# Additionally read default groups with # appended as a suffix.
-?, --help Display this help and exit.
--base64-output=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.
--character-sets-dir=name
Directory for character set files.
-d, --database=name List entries for just this database (local log only).
--debug-check Check memory and open file usage at exit .
--debug-info Print some debug info at exit.
--default-auth=name Default authentication client-side plugin to use.
-D, --disable-log-bin
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.
-B, --flashback Flashback feature can rollback you committed data to a
special time point.
-F, --force-if-open Force if binlog was not closed properly.
(Defaults to on; use --skip-force-if-open to disable.)
-f, --force-read Force reading unknown binlog events.
-H, --hexdump Augment output with hexadecimal and ASCII event dump.
-h, --host=name Get the binlog from server. Defaults in the following
order: $MARIADB_HOST, and then localhost
-l, --local-load=name
Prepare local temporary files for LOAD DATA INFILE in the
specified directory.
-o, --offset=# Skip the first N entries.
-p, --password[=name]
Password to connect to remote server.
--plugin-dir=name Directory for client-side plugins.
-P, --port=# 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).
--protocol=name The protocol to use for connection (tcp, socket, pipe).
-R, --read-from-remote-server
Read binary logs from a MariaDB server.
--raw Requires -R. Output raw binlog data instead of SQL
statements. Output files named after server logs.
-r, --result-file=name
Direct output to a given file. With --raw this is a
prefix for the file names.
--print-row-count Print row counts for each row events
(Defaults to on; use --skip-print-row-count to disable.)
--print-row-event-positions
Print row event positions
(Defaults to on; use --skip-print-row-event-positions to disable.)
--ignore-domain-ids=name
A list of positive integers, separated by commas, that
form a blacklist of domain ids. Any log event with a GTID
that originates from a domain id specified in this list
is hidden. Cannot be used with --do-domain-ids. When used
with --(ignore|do)-server-ids, the result is the
intersection between the two datasets.
--do-domain-ids=name
A list of positive integers, separated by commas, that
form a whitelist of domain ids. Any log event with a GTID
that originates from a domain id specified in this list
is displayed. Cannot be used with --ignore-domain-ids.
When used with --(ignore|do)-server-ids, the result is
the intersection between the two datasets.
--ignore-server-ids=name
A list of positive integers, separated by commas, that
form a blacklist of server ids. Any log event originating
from a server id specified in this list is hidden. Cannot
be used with --do-server-ids. When used with
--(ignore|do)-domain-ids, the result is the intersection
between the two datasets.
--do-server-ids=name
A list of positive integers, separated by commas, that
form a whitelist of server ids. Any log event originating
from a server id specified in this list is displayed.
Cannot be used with --ignore-server-ids. When used with
--(ignore|do)-domain-ids, the result is the intersection
between the two datasets. Alias for --server-id.
--server-id=name Extract only binlog entries created by the server having
the given id. Alias for --do-server-ids.
--set-charset=name Add 'SET NAMES character_set' to the output.
-s, --short-form 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
-S, --socket=name The socket file to use for connection.
--ssl Enable SSL for connection (automatically enabled with
other flags).
(Defaults to on; use --skip-ssl to disable.)
--ssl-ca=name CA file in PEM format (check OpenSSL docs, implies
--ssl).
--ssl-capath=name CA directory (check OpenSSL docs, implies --ssl).
--ssl-cert=name X509 cert in PEM format (implies --ssl).
--ssl-cipher=name SSL cipher to use (implies --ssl).
--ssl-key=name X509 key in PEM format (implies --ssl).
--ssl-crl=name Certificate revocation list (implies --ssl).
--ssl-crlpath=name Certificate revocation list path (implies --ssl).
--tls-version=name TLS protocol version for secure connection.
--ssl-fp=name Server certificate fingerprint (implies --ssl).
--ssl-fplist=name File with accepted server certificate fingerprints, one
per line (implies --ssl).
--ssl-verify-server-cert
Verify server's certificate to prevent man-in-the-middle
attacks
(Defaults to on; use --skip-ssl-verify-server-cert to disable.)
--start-datetime=name
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).
-j, --start-position=name
Start reading the binlog at this position. Type can
either be a positive integer or a GTID list. When using a
positive integer, the value only applies to the first
binlog passed on the command line. In GTID mode, multiple
GTIDs can be passed as a comma separated list, where each
must have a unique domain id. The list represents the
gtid binlog state that the client (another "slave"
server) is aware of. Therefore, each GTID is exclusive;
only events after a given sequence number will be printed
to allow users to receive events after their current
state.
--gtid-strict-mode Process binlog according to gtid-strict-mode
specification. The start, stop positions are verified to
satisfy start < stop comparison condition. Sequence
numbers of any gtid domain must comprise monotically
growing sequence
(Defaults to on; use --skip-gtid-strict-mode to disable.)
--stop-datetime=name
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).
--stop-never Wait for more data from the server instead of stopping at
the end of the last log. Implies --to-last-log.
--stop-never-slave-server-id=#
The slave server_id used for --read-from-remote-server
--stop-never.
--stop-position=name
Stop reading the binlog at this position. Type can either
be a positive integer or a GTID list. When using a
positive integer, the value only applies to the last
binlog passed on the command line. In GTID mode, multiple
GTIDs can be passed as a comma separated list, where each
must have a unique domain id. Each GTID is inclusive;
only events up to the given sequence numbers are printed.
-T, --table=name List entries for just this table (affects only row
events).
-t, --to-last-log 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.
-u, --user=name Connect to the remote server as username.
-v, --verbose Reconstruct SQL statements out of row events. -v -v adds
comments on column data types. -v -v -v adds diagnostic
warnings about event integrity before program exit.
-V, --version Print version and exit.
--open-files-limit=#
Used to reserve file descriptors for use by this program.
--binlog-row-event-max-size=#
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.
-c, --verify-binlog-checksum
Verify binlog event checksums.
--rewrite-db=name Updates to a database with a different name than the
original. Example: rewrite-db='from->to'.
--skip-annotate-row-events
Don't print Annotate_rows events stored in the binary
log.
--print-table-metadata
Print metadata stored in Table_map_log_event
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- ----------------------------------------
base64-output (No default value)
character-sets-dir (No default value)
database (No default value)
debug-check FALSE
debug-info FALSE
default-auth (No default value)
disable-log-bin FALSE
flashback FALSE
force-if-open TRUE
force-read FALSE
hexdump FALSE
host (No default value)
local-load (No default value)
offset 0
plugin-dir (No default value)
port 0
read-from-remote-server FALSE
raw FALSE
result-file (No default value)
print-row-count TRUE
print-row-event-positions TRUE
ignore-domain-ids (No default value)
do-domain-ids (No default value)
ignore-server-ids (No default value)
do-server-ids (No default value)
server-id (No default value)
set-charset (No default value)
short-form FALSE
socket (No default value)
ssl TRUE
ssl-ca (No default value)
ssl-capath (No default value)
ssl-cert (No default value)
ssl-cipher (No default value)
ssl-key (No default value)
ssl-crl (No default value)
ssl-crlpath (No default value)
tls-version (No default value)
ssl-fp (No default value)
ssl-fplist (No default value)
ssl-verify-server-cert TRUE
start-datetime (No default value)
start-position (No default value)
gtid-strict-mode TRUE
stop-datetime (No default value)
stop-never FALSE
stop-never-slave-server-id 0
stop-position (No default value)
table (No default value)
to-last-log FALSE
user (No default value)
open-files-limit 64
binlog-row-event-max-size 4294967040
verify-binlog-checksum FALSE
skip-annotate-row-events FALSE
print-table-metadata FALSE
Options (63)
| Option | Description | Source |
|---|
--print-defaults | Print the program argument list and exit. | help |
--no-defaults | Don't read default options from any option file. | help |
--defaults-file # | Only read default options from the given file #. | help |
--defaults-extra-file # | Read this file after the global files are read. | help |
-?, --help | Display this help and exit. | help |
--base64-output 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… | help |
--character-sets-dir name | Directory for character set files. | help |
--debug-check | Check memory and open file usage at exit . | help |
--debug-info | Print some debug info at exit. | help |
-D, --disable-log-bin | Disable binary log. | help |
-B, --flashback | Flashback feature can rollback you committed data to a special time point. | help |
-f, --force-read | Force reading unknown binlog events. | help |
-H, --hexdump | Augment output with hexadecimal and ASCII event dump. | help |
-h, --host name | Get the binlog from server. | help |
-l, --local-load name | Prepare local temporary files for LOAD DATA INFILE in the specified directory. | help |
-o, --offset # | Skip the first N entries. | help |
-p, --password name | Password to connect to remote server. | help |
--plugin-dir name | Directory for client-side plugins. | help |
-P, --port # | 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). | help |
--protocol name | The protocol to use for connection (tcp, socket, pipe). | help |
-R, --read-from-remote-server | Read binary logs from a MariaDB server. | help |
--raw | Requires -R. | help |
-r, --result-file name | Direct output to a given file. | help |
--print-row-count | Print row counts for each row events (Defaults to on; | help |
--print-row-event-positions | Print row event positions (Defaults to on; | help |
--ignore-domain-ids name | A list of positive integers, separated by commas, that form a blacklist of domain ids. | help |
--do-domain-ids name | A list of positive integers, separated by commas, that form a whitelist of domain ids. | help |
--ignore-server-ids name | A list of positive integers, separated by commas, that form a blacklist of server ids. | help |
--do-server-ids name | A list of positive integers, separated by commas, that form a whitelist of server ids. | help |
--server-id name | Extract only binlog entries created by the server having the given id. | help |
--set-charset name | Add 'SET NAMES character_set' to the output. | help |
-s, --short-form | Just show regular queries: no extra info, no row-based events and no row counts. | help |
-S, --socket name | The socket file to use for connection. | help |
--ssl | Enable SSL for connection (automatically enabled with other flags). | help |
--ssl-ca name | CA file in PEM format (check OpenSSL docs, implies | help |
--ssl-capath name | CA directory (check OpenSSL docs, implies --ssl). | help |
--ssl-cert name | X509 cert in PEM format (implies --ssl). | help |
--ssl-cipher name | SSL cipher to use (implies --ssl). | help |
--ssl-key name | X509 key in PEM format (implies --ssl). | help |
--ssl-crl name | Certificate revocation list (implies --ssl). | help |
--ssl-crlpath name | Certificate revocation list path (implies --ssl). | help |
--tls-version name | TLS protocol version for secure connection. | help |
--ssl-fp name | Server certificate fingerprint (implies --ssl). | help |
--ssl-fplist name | File with accepted server certificate fingerprints, one per line (implies --ssl). | help |
--ssl-verify-server-cert | Verify server's certificate to prevent man-in-the-middle attacks (Defaults to on; | help |
--start-datetime name | Start reading the binlog at first event having a datetime equal or posterior to the argument; | help |
-j, --start-position name | Start reading the binlog at this position. | help |
--gtid-strict-mode | Process binlog according to gtid-strict-mode specification. | help |
--stop-datetime name | Stop reading the binlog at first event having a datetime equal or posterior to the argument; | help |
--stop-never | Wait for more data from the server instead of stopping at the end of the last log. | help |
--stop-never-slave-server-id # | The slave server_id used for --read-from-remote-server | help |
--stop-position name | Stop reading the binlog at this position. | help |
-T, --table name | List entries for just this table (affects only row events). | help |
-t, --to-last-log | Requires -R. | help |
-u, --user name | Connect to the remote server as username. | help |
-v, --verbose | Reconstruct SQL statements out of row events. | help |
-V, --version | Print version and exit. | help |
--open-files-limit # | Used to reserve file descriptors for use by this program. | help |
--binlog-row-event-max-size # | The maximum size of a row-based binary log event in bytes. | help |
-c, --verify-binlog-checksum | Verify binlog event checksums. | help |
--rewrite-db name | Updates to a database with a different name than the original. | help |
--skip-annotate-row-events | Don't print Annotate_rows events stored in the binary log. | help |
--print-table-metadata | Print metadata stored in Table_map_log_event | help |
Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.