Sunday 7 August 2011

mysqlbinlog

The mysqlbinlog utility displays the contents of a binary update log file in readable format. This program can read log files on the local host directly or connect to a remote server to read remote logs.

The format of binary update logs has changed from time to time. You may find it necessary to use a version of mysqlbinlog that is at least as recent as your server version to avoid compatibility problems.

Usage
mysqlbinlog [options] file_name ...

Standard Options Supported by mysqlbinlog
--debug --host --port --version
--help --password --user

The --host, --password, --port, and --user options are used when you want to connect to a remote server to access its binary logs. Otherwise, mysqlbinlog reads local log files directly without connecting to a server.

Options Specific to mysqlbinlog
--database=db_name, -d db_name,

Extract statements from the log file only for the named database. This option works only when reading local logs.

--offset=n, -o n

Skip the first n entries in the log file.

--position=n, -j n

Start reading the log file at position n.

--result-file=file_name, -r file_name

Write output to the named file.

--short-form, -s

Show only the statements in the log; omit any extra information in the log that is associated with the statements.

--table=tbl_name, -t tbl_name

Obtain a raw dump of the named table.

No comments:

Post a Comment