mysql log 参数_mysqlbinlog 参数说明文档 | Byrd's Weblog

/usr/local/mysql/bin/mysqlbinlog Ver 3.4 for Linux at x86_64

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Usage: /usr/local/mysql/bin/mysqlbinlog [options] log-files

-?, --help Display this help and exit.

--base64-output=name

Determine when the output statements should be

base64-encoded BINLOG statements: 'never' disables it and

works only for binlogs without row-based events;

'decode-rows' decodes row events into commented

pseudo-SQL statements if the --verbose option is also

given; 'auto' prints base64 only when necessary (i.e.,

for row-based events and format description events). If

no --base64-output[=name] option is given at all, the

default is 'auto'.

--bind-address=name IP address to bind to.

--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

MySQL 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.

-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.

-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,

memory).

-R, --read-from-remote-server

Read binary logs from a MySQL server. This is an alias

for read-from-remote-master=BINLOG-DUMP-NON-GTIDS.

--read-from-remote-master=name

Read binary logs from a MySQL server through the

COM_BINLOG_DUMP or COM_BINLOG_DUMP_GTID commands by

setting the option to either BINLOG-DUMP-NON-GTIDS or

BINLOG-DUMP-GTIDS, respectively. If

--read-from-remote-master=BINLOG-DUMP-GTIDS is combined

with --exclude-gtids, transactions can be filtered out on

the master avoiding unnecessary network traffic.

--raw Requires -R. Output raw binlog data instead of SQL

statements, output is to log files.

-r, --result-file=name

Direct output to a given file. With --raw this is a

prefix for the file names.

--server-id=# Extract only binlog entries created by the server having

the given id.

--server-id-bits=# Set number of significant bits in server-id

--set-charset=name Add 'SET NAMES character_set' to the output.

-s, --short-form Just show regular queries: no extra info and no row-based

events. This is for testing only, and should not be used

in production systems. If you want to suppress

base64-output, consider using --base64-output=never

instead.

-S, --socket=name The socket file to use for connection.

--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 MySQL 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=#

Start reading the binlog at position N. Applies to the

first binlog passed on the command line.

--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 MySQL 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. Implicitly sets --to-last-log

but instead of stopping at the end of the last log it

continues to wait till the server disconnects.

--stop-never-slave-server-id=#

The slave server ID used for stop-never

--stop-position=# Stop reading the binlog at position N. Applies to the

last binlog passed on the command line.

-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 MySQL server. If you send the output

to the same MySQL server, that may lead to an endless

loop.

-u, --user=name Connect to the remote server as username.

-v, --verbose Reconstruct pseudo-SQL statements out of row events. -v

-v adds comments on column data types.

-V, --version Print version and exit.

--open-files-limit=#

Used to reserve file descriptors for use by this program.

-c, --verify-binlog-checksum

Verify checksum binlog events.

--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.

--skip-gtids Do not print Global Transaction Identifier information

(SET GTID_NEXT=... etc).

--include-gtids=name

Print events whose Global Transaction Identifiers were

provided.

--exclude-gtids=name

Print all events but those whose Global Transaction

Identifiers were provided.

Variables (--variable-name=value)

and boolean options {FALSE|TRUE} Value (after reading options)

--------------------------------- ----------------------------------------

base64-output (No default value)

bind-address (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

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

read-from-remote-master (No default value)

raw FALSE

result-file (No default value)

server-id 0

server-id-bits 32

set-charset (No default value)

short-form FALSE

socket (No default value)

start-datetime (No default value)

start-position 4

stop-datetime (No default value)

stop-never FALSE

stop-never-slave-server-id 65535

stop-position 18446744073709551615

to-last-log FALSE

user (No default value)

open-files-limit 64

verify-binlog-checksum FALSE

binlog-row-event-max-size 4294967040

skip-gtids FALSE

include-gtids (No default value)

exclude-gtids (No default value)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值