mysqlbinlog
— Utility for Processing Binary Log Files
347
•
--stop-datetime=datetime
[347]
Stop reading the binary log at the first event having a timestamp equal to or later than the
datetime
argument. This option is useful for point-in-time recovery. See the description of the
--start-
datetime
[346]
option for information about the
datetime
value.
This option is useful for point-in-time recovery. See
Section 7.3, “Example Backup and Recovery
Strategy”
.
•
--stop-position=N
[347]
Stop reading the binary log at the first event having a position equal to or greater than
N
. This option
applies to the last log file named on the command line.
This option is useful for point-in-time recovery. See
Section 7.3, “Example Backup and Recovery
Strategy”
.
•
--to-last-log
[347]
,
-t
Do not stop at the end of the requested binary log from a MySQL server, but rather continue printing
until the end of the last binary log. If you send the output to the same MySQL server, this may lead to
an endless loop. This option requires
--read-from-remote-server
[346]
.
•
--user=user_name
[347]
,
-u user_name
The MySQL user name to use when connecting to a remote server.
•
--version
[347]
,
-V
Display version information and exit.
In MySQL 5.0, the version number shown for
mysqlbinlog
is always 3.2.
You can also set the following variable by using
--var_name=value
syntax:
•
open_files_limit
Specify the number of open file descriptors to reserve.
It is also possible to set variables by using
--set-variable=var_name=value
or
-O
var_name=value
syntax. This syntax is deprecated.
You can pipe the output of
mysqlbinlog
into the
mysql
client to execute the events contained in
the binary log. This technique is used to recover from a crash when you have an old backup (see
Section 7.5, “Point-in-Time (Incremental) Recovery Using the Binary Log”
). For example:
shell>
mysqlbinlog binlog.000001 | mysql -u root -p
Or:
shell>
mysqlbinlog binlog.[0-9]* | mysql -u root -p
You can also redirect the output of
mysqlbinlog
to a text file instead, if you need to modify the
statement log first (for example, to remove statements that you do not want to execute for some
reason). After editing the file, execute the statements that it contains by using it as input to the
mysql
program:
shell>
mysqlbinlog binlog.000001 > tmpfile
shell> ...
edit tmpfile
...
shell>
mysql -u root -p < tmpfile
When
mysqlbinlog
is invoked with the
--start-position
[346]
option, it displays only those
events with an offset in the binary log greater than or equal to a given position (the given position
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...