You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1986 lines
44 KiB

  1. '\" t
  2. .\" Title: \fBmysqlbinlog\fR
  3. .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
  4. .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
  5. .\" Date: 04/06/2010
  6. .\" Manual: MySQL Database System
  7. .\" Source: MySQL 5.1
  8. .\" Language: English
  9. .\"
  10. .TH "\FBMYSQLBINLOG\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
  11. .\" -----------------------------------------------------------------
  12. .\" * set default formatting
  13. .\" -----------------------------------------------------------------
  14. .\" disable hyphenation
  15. .nh
  16. .\" disable justification (adjust text to left margin only)
  17. .ad l
  18. .\" -----------------------------------------------------------------
  19. .\" * MAIN CONTENT STARTS HERE *
  20. .\" -----------------------------------------------------------------
  21. .\" mysqlbinlog
  22. .SH "NAME"
  23. mysqlbinlog \- utility for processing binary log files
  24. .SH "SYNOPSIS"
  25. .HP \w'\fBmysqlbinlog\ [\fR\fBoptions\fR\fB]\ \fR\fB\fIlog_file\fR\fR\fB\ \&.\&.\&.\fR\ 'u
  26. \fBmysqlbinlog [\fR\fBoptions\fR\fB] \fR\fB\fIlog_file\fR\fR\fB \&.\&.\&.\fR
  27. .SH "DESCRIPTION"
  28. .PP
  29. The server\'s binary log consists of files containing
  30. \(lqevents\(rq
  31. that describe modifications to database contents\&. The server writes these files in binary format\&. To display their contents in text format, use the
  32. \fBmysqlbinlog\fR
  33. utility\&. You can also use
  34. \fBmysqlbinlog\fR
  35. to display the contents of relay log files written by a slave server in a replication setup because relay logs have the same format as binary logs\&. The binary log and relay log are discussed further in
  36. Section\ \&5.2.4, \(lqThe Binary Log\(rq, and
  37. Section\ \&16.2.2, \(lqReplication Relay and Status Files\(rq\&.
  38. .PP
  39. Invoke
  40. \fBmysqlbinlog\fR
  41. like this:
  42. .sp
  43. .if n \{\
  44. .RS 4
  45. .\}
  46. .nf
  47. shell> \fBmysqlbinlog [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIlog_file\fR\fR\fB \&.\&.\&.\fR
  48. .fi
  49. .if n \{\
  50. .RE
  51. .\}
  52. .PP
  53. For example, to display the contents of the binary log file named
  54. binlog\&.000003, use this command:
  55. .sp
  56. .if n \{\
  57. .RS 4
  58. .\}
  59. .nf
  60. shell> \fBmysqlbinlog binlog\&.0000003\fR
  61. .fi
  62. .if n \{\
  63. .RE
  64. .\}
  65. .PP
  66. The output includes events contained in
  67. binlog\&.000003\&. For statement\-based logging, event information includes the SQL statement, the ID of the server on which it was executed, the timestamp when the statement was executed, how much time it took, and so forth\&. For row\-based logging, the event indicates a row change rather than an SQL statement\&. See
  68. Section\ \&16.1.2, \(lqReplication Formats\(rq, for information about logging modes\&.
  69. .PP
  70. Events are preceded by header comments that provide additional information\&. For example:
  71. .sp
  72. .if n \{\
  73. .RS 4
  74. .\}
  75. .nf
  76. # at 141
  77. #100309 9:28:36 server id 123 end_log_pos 245
  78. Query thread_id=3350 exec_time=11 error_code=0
  79. .fi
  80. .if n \{\
  81. .RE
  82. .\}
  83. .PP
  84. In the first line, the number following
  85. at
  86. indicates the starting position of the event in the binary log file\&.
  87. .PP
  88. The second line starts with a date and time indicating when the statement started on the server where the event originated\&. For replication, this timestamp is propagated to slave servers\&.
  89. server id
  90. is the
  91. server_id
  92. value of the server where the event originated\&.
  93. end_log_pos
  94. indicates where the next event starts (that is, it is the end position of the current event + 1)\&.
  95. thread_id
  96. indicates which thread executed the event\&.
  97. exec_time
  98. is the time spent executing the event, on a master server\&. On a slave, it is the difference of the end execution time on the slave minus the beginning execution time on the master\&. The difference serves as an indicator of how much replication lags behind the master\&.
  99. error_code
  100. indicates the result from executing the event\&. Zero means that no error occurred\&.
  101. .PP
  102. The output from
  103. \fBmysqlbinlog\fR
  104. can be re\-executed (for example, by using it as input to
  105. \fBmysql\fR) to redo the statements in the log\&. This is useful for recovery operations after a server crash\&. For other usage examples, see the discussion later in this section and
  106. Section\ \&6.5, \(lqPoint-in-Time (Incremental) Recovery Using the Binary Log\(rq\&.
  107. .PP
  108. Normally, you use
  109. \fBmysqlbinlog\fR
  110. to read binary log files directly and apply them to the local MySQL server\&. It is also possible to read binary logs from a remote server by using the
  111. \fB\-\-read\-from\-remote\-server\fR
  112. option\&. To read remote binary logs, the connection parameter options can be given to indicate how to connect to the server\&. These options are
  113. \fB\-\-host\fR,
  114. \fB\-\-password\fR,
  115. \fB\-\-port\fR,
  116. \fB\-\-protocol\fR,
  117. \fB\-\-socket\fR, and
  118. \fB\-\-user\fR; they are ignored except when you also use the
  119. \fB\-\-read\-from\-remote\-server\fR
  120. option\&.
  121. .PP
  122. \fBmysqlbinlog\fR
  123. supports the following options, which can be specified on the command line or in the
  124. [mysqlbinlog]
  125. and
  126. [client]
  127. option file groups\&.
  128. \fBmysqlbinlog\fR
  129. also supports the options for processing option files described at
  130. Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
  131. .sp
  132. .RS 4
  133. .ie n \{\
  134. \h'-04'\(bu\h'+03'\c
  135. .\}
  136. .el \{\
  137. .sp -1
  138. .IP \(bu 2.3
  139. .\}
  140. .\" mysqlbinlog: help option
  141. .\" help option: mysqlbinlog
  142. \fB\-\-help\fR,
  143. \fB\-?\fR
  144. .sp
  145. Display a help message and exit\&.
  146. .RE
  147. .sp
  148. .RS 4
  149. .ie n \{\
  150. \h'-04'\(bu\h'+03'\c
  151. .\}
  152. .el \{\
  153. .sp -1
  154. .IP \(bu 2.3
  155. .\}
  156. .\" mysqlbinlog: base64-output option
  157. .\" base64-output option: mysqlbinlog
  158. \fB\-\-base64\-output[=\fR\fB\fIvalue\fR\fR\fB]\fR
  159. .sp
  160. This option determines when events should be displayed encoded as base\-64 strings using
  161. BINLOG
  162. statements\&. The option has these allowable values (not case sensitive):
  163. .sp
  164. .RS 4
  165. .ie n \{\
  166. \h'-04'\(bu\h'+03'\c
  167. .\}
  168. .el \{\
  169. .sp -1
  170. .IP \(bu 2.3
  171. .\}
  172. AUTO
  173. ("automatic") or
  174. UNSPEC
  175. ("unspecified") displays
  176. BINLOG
  177. statements automatically when necessary (that is, for format description events and row events)\&. This is the default if no
  178. \fB\-\-base64\-output\fR
  179. option is given\&.
  180. .if n \{\
  181. .sp
  182. .\}
  183. .RS 4
  184. .it 1 an-trap
  185. .nr an-no-space-flag 1
  186. .nr an-break-flag 1
  187. .br
  188. .ps +1
  189. \fBNote\fR
  190. .ps -1
  191. .br
  192. Automatic
  193. BINLOG
  194. display is the only safe behavior if you intend to use the output of
  195. \fBmysqlbinlog\fR
  196. to re\-execute binary log file contents\&. The other option values are intended only for debugging or testing purposes because they may produce output that does not include all events in executable form\&.
  197. .sp .5v
  198. .RE
  199. .RE
  200. .sp
  201. .RS 4
  202. .ie n \{\
  203. \h'-04'\(bu\h'+03'\c
  204. .\}
  205. .el \{\
  206. .sp -1
  207. .IP \(bu 2.3
  208. .\}
  209. ALWAYS
  210. displays
  211. BINLOG
  212. statements whenever possible\&. This is the implied value if the option is given as
  213. \fB\-\-base64\-output\fR
  214. without a value\&.
  215. .RE
  216. .sp
  217. .RS 4
  218. .ie n \{\
  219. \h'-04'\(bu\h'+03'\c
  220. .\}
  221. .el \{\
  222. .sp -1
  223. .IP \(bu 2.3
  224. .\}
  225. NEVER
  226. causes
  227. BINLOG
  228. statements not to be displayed\&.
  229. \fBmysqlbinlog\fR
  230. exits with an error if a row event is found that must be displayed using
  231. BINLOG\&.
  232. .RE
  233. .sp
  234. .RS 4
  235. .ie n \{\
  236. \h'-04'\(bu\h'+03'\c
  237. .\}
  238. .el \{\
  239. .sp -1
  240. .IP \(bu 2.3
  241. .\}
  242. DECODE\-ROWS
  243. specifies to
  244. \fBmysqlbinlog\fR
  245. that you intend for row events to be decoded and displayed as commented SQL statements by also specifying the
  246. \fB\-\-verbose\fR
  247. option\&. Like
  248. NEVER,
  249. DECODE\-ROWS
  250. suppresses display of
  251. BINLOG
  252. statements, but unlike
  253. NEVER, it does not exit with an error if a row event is found\&.
  254. .RE
  255. .RS 4
  256. The
  257. \fB\-\-base64\-output\fR
  258. option was introduced in MySQL 5\&.1\&.5, to be given as
  259. \fB\-\-base64\-output\fR
  260. or
  261. \fB\-\-skip\-base64\-output\fR
  262. (with the sense of
  263. AUTO
  264. or
  265. NEVER)\&. The option values described in the preceding list may be used as of MySQL 5\&.1\&.24, with the exception of
  266. UNSPEC
  267. and
  268. DECODE\-ROWS, which are available as of MySQL 5\&.1\&.28\&.
  269. .sp
  270. For examples that show the effect of
  271. \fB\-\-base64\-output\fR
  272. and
  273. \fB\-\-verbose\fR
  274. on row event output, see
  275. the section called \(lqMYSQLBINLOG ROW EVENT DISPLAY\(rq\&.
  276. .RE
  277. .sp
  278. .RS 4
  279. .ie n \{\
  280. \h'-04'\(bu\h'+03'\c
  281. .\}
  282. .el \{\
  283. .sp -1
  284. .IP \(bu 2.3
  285. .\}
  286. .\" mysqlbinlog: character-sets-dir option
  287. .\" character-sets-dir option: mysqlbinlog
  288. \fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
  289. .sp
  290. The directory where character sets are installed\&. See
  291. Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
  292. .RE
  293. .sp
  294. .RS 4
  295. .ie n \{\
  296. \h'-04'\(bu\h'+03'\c
  297. .\}
  298. .el \{\
  299. .sp -1
  300. .IP \(bu 2.3
  301. .\}
  302. .\" mysqlbinlog: database option
  303. .\" database option: mysqlbinlog
  304. \fB\-\-database=\fR\fB\fIdb_name\fR\fR,
  305. \fB\-d \fR\fB\fIdb_name\fR\fR
  306. .sp
  307. This option causes
  308. \fBmysqlbinlog\fR
  309. to output entries from the binary log (local log only) that occur while
  310. \fIdb_name\fR
  311. is been selected as the default database by
  312. USE\&.
  313. .sp
  314. The
  315. \fB\-\-database\fR
  316. option for
  317. \fBmysqlbinlog\fR
  318. is similar to the
  319. \fB\-\-binlog\-do\-db\fR
  320. option for
  321. \fBmysqld\fR, but can be used to specify only one database\&. If
  322. \fB\-\-database\fR
  323. is given multiple times, only the last instance is used\&.
  324. .sp
  325. The effects of this option depend on whether the statement\-based or row\-based logging format is in use, in the same way that the effects of
  326. \fB\-\-binlog\-do\-db\fR
  327. depend on whether statement\-based or row\-based logging is in use\&.
  328. .PP
  329. \fBStatement-based logging\fR. The
  330. \fB\-\-database\fR
  331. option works as follows:
  332. .sp
  333. .RS 4
  334. .ie n \{\
  335. \h'-04'\(bu\h'+03'\c
  336. .\}
  337. .el \{\
  338. .sp -1
  339. .IP \(bu 2.3
  340. .\}
  341. While
  342. \fIdb_name\fR
  343. is the default database, statements are output whether they modify tables in
  344. \fIdb_name\fR
  345. or a different database\&.
  346. .RE
  347. .sp
  348. .RS 4
  349. .ie n \{\
  350. \h'-04'\(bu\h'+03'\c
  351. .\}
  352. .el \{\
  353. .sp -1
  354. .IP \(bu 2.3
  355. .\}
  356. Unless
  357. \fIdb_name\fR
  358. is selected as the default database, statements are not output, even if they modify tables in
  359. \fIdb_name\fR\&.
  360. .RE
  361. .sp
  362. .RS 4
  363. .ie n \{\
  364. \h'-04'\(bu\h'+03'\c
  365. .\}
  366. .el \{\
  367. .sp -1
  368. .IP \(bu 2.3
  369. .\}
  370. There is an exception for
  371. CREATE DATABASE,
  372. ALTER DATABASE, and
  373. DROP DATABASE\&. The database being
  374. \fIcreated, altered, or dropped\fR
  375. is considered to be the default database when determining whether to output the statement\&.
  376. .RE
  377. .RS 4
  378. Suppose that the binary log was created by executing these statements using statement\-based\-logging:
  379. .sp
  380. .if n \{\
  381. .RS 4
  382. .\}
  383. .nf
  384. INSERT INTO test\&.t1 (i) VALUES(100);
  385. INSERT INTO db2\&.t2 (j) VALUES(200);
  386. USE test;
  387. INSERT INTO test\&.t1 (i) VALUES(101);
  388. INSERT INTO t1 (i) VALUES(102);
  389. INSERT INTO db2\&.t2 (j) VALUES(201);
  390. USE db2;
  391. INSERT INTO test\&.t1 (i) VALUES(103);
  392. INSERT INTO db2\&.t2 (j) VALUES(202);
  393. INSERT INTO t2 (j) VALUES(203);
  394. .fi
  395. .if n \{\
  396. .RE
  397. .\}
  398. .sp
  399. \fBmysqlbinlog \-\-database=test\fR
  400. does not output the first two
  401. INSERT
  402. statements because there is no default database\&. It outputs the three
  403. INSERT
  404. statements following
  405. USE test, but not the three
  406. INSERT
  407. statements following
  408. USE db2\&.
  409. .sp
  410. \fBmysqlbinlog \-\-database=db2\fR
  411. does not output the first two
  412. INSERT
  413. statements because there is no default database\&. It does not output the three
  414. INSERT
  415. statements following
  416. USE test, but does output the three
  417. INSERT
  418. statements following
  419. USE db2\&.
  420. .PP
  421. \fBRow-based logging\fR.
  422. \fBmysqlbinlog\fR
  423. outputs only entries that change tables belonging to
  424. \fIdb_name\fR\&. The default database has no effect on this\&. Suppose that the binary log just described was created using row\-based logging rather than statement\-based logging\&.
  425. \fBmysqlbinlog \-\-database=test\fR
  426. outputs only those entries that modify
  427. t1
  428. in the test database, regardless of whether
  429. USE
  430. was issued or what the default database is\&.
  431. If a server is running with
  432. binlog_format
  433. set to
  434. MIXED
  435. and you want it to be possible to use
  436. \fBmysqlbinlog\fR
  437. with the
  438. \fB\-\-database\fR
  439. option, you must ensure that tables that are modified are in the database selected by
  440. USE\&. (In particular, no cross\-database updates should be used\&.)
  441. .if n \{\
  442. .sp
  443. .\}
  444. .RS 4
  445. .it 1 an-trap
  446. .nr an-no-space-flag 1
  447. .nr an-break-flag 1
  448. .br
  449. .ps +1
  450. \fBNote\fR
  451. .ps -1
  452. .br
  453. This option did not work correctly for
  454. \fBmysqlbinlog\fR
  455. with row\-based logging prior to MySQL 5\&.1\&.37\&. (\m[blue]\fBBug#42941\fR\m[]\&\s-2\u[1]\d\s+2)
  456. .sp .5v
  457. .RE
  458. .RE
  459. .sp
  460. .RS 4
  461. .ie n \{\
  462. \h'-04'\(bu\h'+03'\c
  463. .\}
  464. .el \{\
  465. .sp -1
  466. .IP \(bu 2.3
  467. .\}
  468. .\" mysqlbinlog: debug option
  469. .\" debug option: mysqlbinlog
  470. \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR,
  471. \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR
  472. .sp
  473. Write a debugging log\&. A typical
  474. \fIdebug_options\fR
  475. string is
  476. \'d:t:o,\fIfile_name\fR\'\&. The default is
  477. \'d:t:o,/tmp/mysqlbinlog\&.trace\'\&.
  478. .RE
  479. .sp
  480. .RS 4
  481. .ie n \{\
  482. \h'-04'\(bu\h'+03'\c
  483. .\}
  484. .el \{\
  485. .sp -1
  486. .IP \(bu 2.3
  487. .\}
  488. .\" mysqlbinlog: debug-check option
  489. .\" debug-check option: mysqlbinlog
  490. \fB\-\-debug\-check\fR
  491. .sp
  492. Print some debugging information when the program exits\&. This option was added in MySQL 5\&.1\&.21\&.
  493. .RE
  494. .sp
  495. .RS 4
  496. .ie n \{\
  497. \h'-04'\(bu\h'+03'\c
  498. .\}
  499. .el \{\
  500. .sp -1
  501. .IP \(bu 2.3
  502. .\}
  503. .\" mysqlbinlog: debug-info option
  504. .\" debug-info option: mysqlbinlog
  505. \fB\-\-debug\-info\fR
  506. .sp
  507. Print debugging information and memory and CPU usage statistics when the program exits\&. This option was added in MySQL 5\&.1\&.21\&.
  508. .RE
  509. .sp
  510. .RS 4
  511. .ie n \{\
  512. \h'-04'\(bu\h'+03'\c
  513. .\}
  514. .el \{\
  515. .sp -1
  516. .IP \(bu 2.3
  517. .\}
  518. .\" mysqlbinlog: disable-log-bin option
  519. .\" disable-log-bin option: mysqlbinlog
  520. \fB\-\-disable\-log\-bin\fR,
  521. \fB\-D\fR
  522. .sp
  523. Disable binary logging\&. This is useful for avoiding an endless loop if you use the
  524. \fB\-\-to\-last\-log\fR
  525. option and are sending the output to the same MySQL server\&. This option also is useful when restoring after a crash to avoid duplication of the statements you have logged\&.
  526. .sp
  527. This option requires that you have the
  528. SUPER
  529. privilege\&. It causes
  530. \fBmysqlbinlog\fR
  531. to include a
  532. SET sql_log_bin = 0
  533. statement in its output to disable binary logging of the remaining output\&. The
  534. SET
  535. statement is ineffective unless you have the
  536. SUPER
  537. privilege\&.
  538. .RE
  539. .sp
  540. .RS 4
  541. .ie n \{\
  542. \h'-04'\(bu\h'+03'\c
  543. .\}
  544. .el \{\
  545. .sp -1
  546. .IP \(bu 2.3
  547. .\}
  548. .\" mysqlbinlog: force-read option
  549. .\" force-read option: mysqlbinlog
  550. \fB\-\-force\-read\fR,
  551. \fB\-f\fR
  552. .sp
  553. With this option, if
  554. \fBmysqlbinlog\fR
  555. reads a binary log event that it does not recognize, it prints a warning, ignores the event, and continues\&. Without this option,
  556. \fBmysqlbinlog\fR
  557. stops if it reads such an event\&.
  558. .RE
  559. .sp
  560. .RS 4
  561. .ie n \{\
  562. \h'-04'\(bu\h'+03'\c
  563. .\}
  564. .el \{\
  565. .sp -1
  566. .IP \(bu 2.3
  567. .\}
  568. .\" mysqlbinlog: hexdump option
  569. .\" hexdump option: mysqlbinlog
  570. \fB\-\-hexdump\fR,
  571. \fB\-H\fR
  572. .sp
  573. Display a hex dump of the log in comments, as described in
  574. the section called \(lqMYSQLBINLOG HEX DUMP FORMAT\(rq\&. The hex output can be helpful for replication debugging\&. This option was added in MySQL 5\&.1\&.2\&.
  575. .RE
  576. .sp
  577. .RS 4
  578. .ie n \{\
  579. \h'-04'\(bu\h'+03'\c
  580. .\}
  581. .el \{\
  582. .sp -1
  583. .IP \(bu 2.3
  584. .\}
  585. .\" mysqlbinlog: host option
  586. .\" host option: mysqlbinlog
  587. \fB\-\-host=\fR\fB\fIhost_name\fR\fR,
  588. \fB\-h \fR\fB\fIhost_name\fR\fR
  589. .sp
  590. Get the binary log from the MySQL server on the given host\&.
  591. .RE
  592. .sp
  593. .RS 4
  594. .ie n \{\
  595. \h'-04'\(bu\h'+03'\c
  596. .\}
  597. .el \{\
  598. .sp -1
  599. .IP \(bu 2.3
  600. .\}
  601. .\" mysqlbinlog: local-load option
  602. .\" local-load option: mysqlbinlog
  603. \fB\-\-local\-load=\fR\fB\fIpath\fR\fR,
  604. \fB\-l \fR\fB\fIpath\fR\fR
  605. .sp
  606. Prepare local temporary files for
  607. LOAD DATA INFILE
  608. in the specified directory\&.
  609. .RE
  610. .sp
  611. .RS 4
  612. .ie n \{\
  613. \h'-04'\(bu\h'+03'\c
  614. .\}
  615. .el \{\
  616. .sp -1
  617. .IP \(bu 2.3
  618. .\}
  619. .\" mysqlbinlog: offset option
  620. .\" offset option: mysqlbinlog
  621. \fB\-\-offset=\fR\fB\fIN\fR\fR,
  622. \fB\-o \fR\fB\fIN\fR\fR
  623. .sp
  624. Skip the first
  625. \fIN\fR
  626. entries in the log\&.
  627. .RE
  628. .sp
  629. .RS 4
  630. .ie n \{\
  631. \h'-04'\(bu\h'+03'\c
  632. .\}
  633. .el \{\
  634. .sp -1
  635. .IP \(bu 2.3
  636. .\}
  637. .\" mysqlbinlog: password option
  638. .\" password option: mysqlbinlog
  639. \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR,
  640. \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR
  641. .sp
  642. The password to use when connecting to the server\&. If you use the short option form (\fB\-p\fR), you
  643. \fIcannot\fR
  644. have a space between the option and the password\&. If you omit the
  645. \fIpassword\fR
  646. value following the
  647. \fB\-\-password\fR
  648. or
  649. \fB\-p\fR
  650. option on the command line,
  651. \fBmysqlbinlog\fR
  652. prompts for one\&.
  653. .sp
  654. Specifying a password on the command line should be considered insecure\&. See
  655. Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&.
  656. .RE
  657. .sp
  658. .RS 4
  659. .ie n \{\
  660. \h'-04'\(bu\h'+03'\c
  661. .\}
  662. .el \{\
  663. .sp -1
  664. .IP \(bu 2.3
  665. .\}
  666. .\" mysqlbinlog: port option
  667. .\" port option: mysqlbinlog
  668. \fB\-\-port=\fR\fB\fIport_num\fR\fR,
  669. \fB\-P \fR\fB\fIport_num\fR\fR
  670. .sp
  671. The TCP/IP port number to use for connecting to a remote server\&.
  672. .RE
  673. .sp
  674. .RS 4
  675. .ie n \{\
  676. \h'-04'\(bu\h'+03'\c
  677. .\}
  678. .el \{\
  679. .sp -1
  680. .IP \(bu 2.3
  681. .\}
  682. .\" mysqlbinlog: position option
  683. .\" position option: mysqlbinlog
  684. \fB\-\-position=\fR\fB\fIN\fR\fR
  685. .sp
  686. Deprecated\&. Use
  687. \fB\-\-start\-position\fR
  688. instead\&.
  689. \fB\-\-position\fR
  690. is removed in MySQL 5\&.5\&.
  691. .RE
  692. .sp
  693. .RS 4
  694. .ie n \{\
  695. \h'-04'\(bu\h'+03'\c
  696. .\}
  697. .el \{\
  698. .sp -1
  699. .IP \(bu 2.3
  700. .\}
  701. .\" mysqlbinlog: protocol option
  702. .\" protocol option: mysqlbinlog
  703. \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR
  704. .sp
  705. The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the allowable values, see
  706. Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&.
  707. .RE
  708. .sp
  709. .RS 4
  710. .ie n \{\
  711. \h'-04'\(bu\h'+03'\c
  712. .\}
  713. .el \{\
  714. .sp -1
  715. .IP \(bu 2.3
  716. .\}
  717. .\" mysqlbinlog: read-from-remote-server option
  718. .\" read-from-remote-server option: mysqlbinlog
  719. \fB\-\-read\-from\-remote\-server\fR,
  720. \fB\-R\fR
  721. .sp
  722. Read the binary log from a MySQL server rather than reading a local log file\&. Any connection parameter options are ignored unless this option is given as well\&. These options are
  723. \fB\-\-host\fR,
  724. \fB\-\-password\fR,
  725. \fB\-\-port\fR,
  726. \fB\-\-protocol\fR,
  727. \fB\-\-socket\fR, and
  728. \fB\-\-user\fR\&.
  729. .sp
  730. This option requires that the remote server be running\&. It works only for binary log files on the remote server, not relay log files\&.
  731. .RE
  732. .sp
  733. .RS 4
  734. .ie n \{\
  735. \h'-04'\(bu\h'+03'\c
  736. .\}
  737. .el \{\
  738. .sp -1
  739. .IP \(bu 2.3
  740. .\}
  741. .\" mysqlbinlog: result-file option
  742. .\" result-file option: mysqlbinlog
  743. \fB\-\-result\-file=\fR\fB\fIname\fR\fR,
  744. \fB\-r \fR\fB\fIname\fR\fR
  745. .sp
  746. Direct output to the given file\&.
  747. .RE
  748. .sp
  749. .RS 4
  750. .ie n \{\
  751. \h'-04'\(bu\h'+03'\c
  752. .\}
  753. .el \{\
  754. .sp -1
  755. .IP \(bu 2.3
  756. .\}
  757. .\" mysqlbinlog: server-id option
  758. .\" server-id option: mysqlbinlog
  759. \fB\-\-server\-id=\fR\fB\fIid\fR\fR
  760. .sp
  761. Display only those events created by the server having the given server ID\&. This option is available as of MySQL 5\&.1\&.4\&.
  762. .RE
  763. .sp
  764. .RS 4
  765. .ie n \{\
  766. \h'-04'\(bu\h'+03'\c
  767. .\}
  768. .el \{\
  769. .sp -1
  770. .IP \(bu 2.3
  771. .\}
  772. .\" mysqlbinlog: set-charset option
  773. .\" set-charset option: mysqlbinlog
  774. \fB\-\-set\-charset=\fR\fB\fIcharset_name\fR\fR
  775. .sp
  776. Add a
  777. SET NAMES \fIcharset_name\fR
  778. statement to the output to specify the character set to be used for processing log files\&. This option was added in MySQL 5\&.1\&.12\&.
  779. .RE
  780. .sp
  781. .RS 4
  782. .ie n \{\
  783. \h'-04'\(bu\h'+03'\c
  784. .\}
  785. .el \{\
  786. .sp -1
  787. .IP \(bu 2.3
  788. .\}
  789. .\" mysqlbinlog: short-form option
  790. .\" short-form option: mysqlbinlog
  791. \fB\-\-short\-form\fR,
  792. \fB\-s\fR
  793. .sp
  794. Display only the statements contained in the log, without any extra information\&.
  795. .RE
  796. .sp
  797. .RS 4
  798. .ie n \{\
  799. \h'-04'\(bu\h'+03'\c
  800. .\}
  801. .el \{\
  802. .sp -1
  803. .IP \(bu 2.3
  804. .\}
  805. .\" mysqlbinlog: socket option
  806. .\" socket option: mysqlbinlog
  807. \fB\-\-socket=\fR\fB\fIpath\fR\fR,
  808. \fB\-S \fR\fB\fIpath\fR\fR
  809. .sp
  810. For connections to
  811. localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use\&.
  812. .RE
  813. .sp
  814. .RS 4
  815. .ie n \{\
  816. \h'-04'\(bu\h'+03'\c
  817. .\}
  818. .el \{\
  819. .sp -1
  820. .IP \(bu 2.3
  821. .\}
  822. .\" mysqlbinlog: start-datetime option
  823. .\" start-datetime option: mysqlbinlog
  824. \fB\-\-start\-datetime=\fR\fB\fIdatetime\fR\fR
  825. .sp
  826. Start reading the binary log at the first event having a timestamp equal to or later than the
  827. \fIdatetime\fR
  828. argument\&. The
  829. \fIdatetime\fR
  830. value is relative to the local time zone on the machine where you run
  831. \fBmysqlbinlog\fR\&. The value should be in a format accepted for the
  832. DATETIME
  833. or
  834. TIMESTAMP
  835. data types\&. For example:
  836. .sp
  837. .if n \{\
  838. .RS 4
  839. .\}
  840. .nf
  841. shell> \fBmysqlbinlog \-\-start\-datetime="2005\-12\-25 11:25:56" binlog\&.000003\fR
  842. .fi
  843. .if n \{\
  844. .RE
  845. .\}
  846. .sp
  847. This option is useful for point\-in\-time recovery\&. See
  848. Section\ \&6.3, \(lqExample Backup and Recovery Strategy\(rq\&.
  849. .RE
  850. .sp
  851. .RS 4
  852. .ie n \{\
  853. \h'-04'\(bu\h'+03'\c
  854. .\}
  855. .el \{\
  856. .sp -1
  857. .IP \(bu 2.3
  858. .\}
  859. .\" mysqlbinlog: start-position option
  860. .\" start-position option: mysqlbinlog
  861. \fB\-\-start\-position=\fR\fB\fIN\fR\fR,
  862. \fB\-j \fR\fB\fIN\fR\fR
  863. .sp
  864. Start reading the binary log at the first event having a position equal to or greater than
  865. \fIN\fR\&. This option applies to the first log file named on the command line\&.
  866. .sp
  867. This option is useful for point\-in\-time recovery\&. See
  868. Section\ \&6.3, \(lqExample Backup and Recovery Strategy\(rq\&.
  869. .RE
  870. .sp
  871. .RS 4
  872. .ie n \{\
  873. \h'-04'\(bu\h'+03'\c
  874. .\}
  875. .el \{\
  876. .sp -1
  877. .IP \(bu 2.3
  878. .\}
  879. .\" mysqlbinlog: stop-datetime option
  880. .\" stop-datetime option: mysqlbinlog
  881. \fB\-\-stop\-datetime=\fR\fB\fIdatetime\fR\fR
  882. .sp
  883. Stop reading the binary log at the first event having a timestamp equal to or later than the
  884. \fIdatetime\fR
  885. argument\&. This option is useful for point\-in\-time recovery\&. See the description of the
  886. \fB\-\-start\-datetime\fR
  887. option for information about the
  888. \fIdatetime\fR
  889. value\&.
  890. .sp
  891. This option is useful for point\-in\-time recovery\&. See
  892. Section\ \&6.3, \(lqExample Backup and Recovery Strategy\(rq\&.
  893. .RE
  894. .sp
  895. .RS 4
  896. .ie n \{\
  897. \h'-04'\(bu\h'+03'\c
  898. .\}
  899. .el \{\
  900. .sp -1
  901. .IP \(bu 2.3
  902. .\}
  903. .\" mysqlbinlog: stop-position option
  904. .\" stop-position option: mysqlbinlog
  905. \fB\-\-stop\-position=\fR\fB\fIN\fR\fR
  906. .sp
  907. Stop reading the binary log at the first event having a position equal to or greater than
  908. \fIN\fR\&. This option applies to the last log file named on the command line\&.
  909. .sp
  910. This option is useful for point\-in\-time recovery\&. See
  911. Section\ \&6.3, \(lqExample Backup and Recovery Strategy\(rq\&.
  912. .RE
  913. .sp
  914. .RS 4
  915. .ie n \{\
  916. \h'-04'\(bu\h'+03'\c
  917. .\}
  918. .el \{\
  919. .sp -1
  920. .IP \(bu 2.3
  921. .\}
  922. .\" mysqlbinlog: to-last-log option
  923. .\" to-last-log option: mysqlbinlog
  924. \fB\-\-to\-last\-log\fR,
  925. \fB\-t\fR
  926. .sp
  927. 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
  928. \fB\-\-read\-from\-remote\-server\fR\&.
  929. .RE
  930. .sp
  931. .RS 4
  932. .ie n \{\
  933. \h'-04'\(bu\h'+03'\c
  934. .\}
  935. .el \{\
  936. .sp -1
  937. .IP \(bu 2.3
  938. .\}
  939. .\" mysqlbinlog: user option
  940. .\" user option: mysqlbinlog
  941. \fB\-\-user=\fR\fB\fIuser_name\fR\fR,
  942. \fB\-u \fR\fB\fIuser_name\fR\fR
  943. .sp
  944. The MySQL user name to use when connecting to a remote server\&.
  945. .RE
  946. .sp
  947. .RS 4
  948. .ie n \{\
  949. \h'-04'\(bu\h'+03'\c
  950. .\}
  951. .el \{\
  952. .sp -1
  953. .IP \(bu 2.3
  954. .\}
  955. .\" mysqlbinlog: verbose option
  956. .\" verbose option: mysqlbinlog
  957. \fB\-\-verbose\fR,
  958. \fB\-v\fR
  959. .sp
  960. Reconstruct row events and display them as commented SQL statements\&. If this option is given twice, the output includes comments to indicate column data types and some metadata\&. This option was added in MySQL 5\&.1\&.28\&.
  961. .sp
  962. For examples that show the effect of
  963. \fB\-\-base64\-output\fR
  964. and
  965. \fB\-\-verbose\fR
  966. on row event output, see
  967. the section called \(lqMYSQLBINLOG ROW EVENT DISPLAY\(rq\&.
  968. .RE
  969. .sp
  970. .RS 4
  971. .ie n \{\
  972. \h'-04'\(bu\h'+03'\c
  973. .\}
  974. .el \{\
  975. .sp -1
  976. .IP \(bu 2.3
  977. .\}
  978. .\" mysqlbinlog: version option
  979. .\" version option: mysqlbinlog
  980. \fB\-\-version\fR,
  981. \fB\-V\fR
  982. .sp
  983. Display version information and exit\&.
  984. .RE
  985. .PP
  986. You can also set the following variable by using
  987. \fB\-\-\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR
  988. syntax:
  989. .sp
  990. .RS 4
  991. .ie n \{\
  992. \h'-04'\(bu\h'+03'\c
  993. .\}
  994. .el \{\
  995. .sp -1
  996. .IP \(bu 2.3
  997. .\}
  998. .\" open_files_limit variable
  999. open_files_limit
  1000. .sp
  1001. Specify the number of open file descriptors to reserve\&.
  1002. .RE
  1003. .PP
  1004. You can pipe the output of
  1005. \fBmysqlbinlog\fR
  1006. into the
  1007. \fBmysql\fR
  1008. 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
  1009. Section\ \&6.5, \(lqPoint-in-Time (Incremental) Recovery Using the Binary Log\(rq)\&. For example:
  1010. .sp
  1011. .if n \{\
  1012. .RS 4
  1013. .\}
  1014. .nf
  1015. shell> \fBmysqlbinlog binlog\&.000001 | mysql \-u root \-p\fR
  1016. .fi
  1017. .if n \{\
  1018. .RE
  1019. .\}
  1020. .PP
  1021. Or:
  1022. .sp
  1023. .if n \{\
  1024. .RS 4
  1025. .\}
  1026. .nf
  1027. shell> \fBmysqlbinlog binlog\&.[0\-9]* | mysql \-u root \-p\fR
  1028. .fi
  1029. .if n \{\
  1030. .RE
  1031. .\}
  1032. .PP
  1033. You can also redirect the output of
  1034. \fBmysqlbinlog\fR
  1035. 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
  1036. \fBmysql\fR
  1037. program:
  1038. .sp
  1039. .if n \{\
  1040. .RS 4
  1041. .\}
  1042. .nf
  1043. shell> \fBmysqlbinlog binlog\&.000001 > tmpfile\fR
  1044. shell> \&.\&.\&. \fIedit tmpfile\fR \&.\&.\&.
  1045. shell> \fBmysql \-u root \-p < tmpfile\fR
  1046. .fi
  1047. .if n \{\
  1048. .RE
  1049. .\}
  1050. .PP
  1051. When
  1052. \fBmysqlbinlog\fR
  1053. is invoked with the
  1054. \fB\-\-start\-position\fR
  1055. option, it displays only those events with an offset in the binary log greater than or equal to a given position (the given position must match the start of one event)\&. It also has options to stop and start when it sees an event with a given date and time\&. This enables you to perform point\-in\-time recovery using the
  1056. \fB\-\-stop\-datetime\fR
  1057. option (to be able to say, for example,
  1058. \(lqroll forward my databases to how they were today at 10:30 a\&.m\&.\(rq)\&.
  1059. .PP
  1060. If you have more than one binary log to execute on the MySQL server, the safe method is to process them all using a single connection to the server\&. Here is an example that demonstrates what may be
  1061. \fIunsafe\fR:
  1062. .sp
  1063. .if n \{\
  1064. .RS 4
  1065. .\}
  1066. .nf
  1067. shell> \fBmysqlbinlog binlog\&.000001 | mysql \-u root \-p # DANGER!!\fR
  1068. shell> \fBmysqlbinlog binlog\&.000002 | mysql \-u root \-p # DANGER!!\fR
  1069. .fi
  1070. .if n \{\
  1071. .RE
  1072. .\}
  1073. .PP
  1074. Processing binary logs this way using different connections to the server causes problems if the first log file contains a
  1075. CREATE TEMPORARY TABLE
  1076. statement and the second log contains a statement that uses the temporary table\&. When the first
  1077. \fBmysql\fR
  1078. process terminates, the server drops the temporary table\&. When the second
  1079. \fBmysql\fR
  1080. process attempts to use the table, the server reports
  1081. \(lqunknown table\&.\(rq
  1082. .PP
  1083. To avoid problems like this, use a
  1084. \fIsingle\fR
  1085. \fBmysql\fR
  1086. process to execute the contents of all binary logs that you want to process\&. Here is one way to do so:
  1087. .sp
  1088. .if n \{\
  1089. .RS 4
  1090. .\}
  1091. .nf
  1092. shell> \fBmysqlbinlog binlog\&.000001 binlog\&.000002 | mysql \-u root \-p\fR
  1093. .fi
  1094. .if n \{\
  1095. .RE
  1096. .\}
  1097. .PP
  1098. Another approach is to write all the logs to a single file and then process the file:
  1099. .sp
  1100. .if n \{\
  1101. .RS 4
  1102. .\}
  1103. .nf
  1104. shell> \fBmysqlbinlog binlog\&.000001 > /tmp/statements\&.sql\fR
  1105. shell> \fBmysqlbinlog binlog\&.000002 >> /tmp/statements\&.sql\fR
  1106. shell> \fBmysql \-u root \-p \-e "source /tmp/statements\&.sql"\fR
  1107. .fi
  1108. .if n \{\
  1109. .RE
  1110. .\}
  1111. .PP
  1112. \fBmysqlbinlog\fR
  1113. can produce output that reproduces a
  1114. LOAD DATA INFILE
  1115. operation without the original data file\&.
  1116. \fBmysqlbinlog\fR
  1117. copies the data to a temporary file and writes a
  1118. LOAD DATA LOCAL INFILE
  1119. statement that refers to the file\&. The default location of the directory where these files are written is system\-specific\&. To specify a directory explicitly, use the
  1120. \fB\-\-local\-load\fR
  1121. option\&.
  1122. .PP
  1123. Because
  1124. \fBmysqlbinlog\fR
  1125. converts
  1126. LOAD DATA INFILE
  1127. statements to
  1128. LOAD DATA LOCAL INFILE
  1129. statements (that is, it adds
  1130. LOCAL), both the client and the server that you use to process the statements must be configured with the
  1131. LOCAL
  1132. capability enabled\&. See
  1133. Section\ \&5.3.5, \(lqSecurity Issues with LOAD DATA LOCAL\(rq\&.
  1134. .if n \{\
  1135. .sp
  1136. .\}
  1137. .RS 4
  1138. .it 1 an-trap
  1139. .nr an-no-space-flag 1
  1140. .nr an-break-flag 1
  1141. .br
  1142. .ps +1
  1143. \fBWarning\fR
  1144. .ps -1
  1145. .br
  1146. .PP
  1147. The temporary files created for
  1148. LOAD DATA LOCAL
  1149. statements are
  1150. \fInot\fR
  1151. automatically deleted because they are needed until you actually execute those statements\&. You should delete the temporary files yourself after you no longer need the statement log\&. The files can be found in the temporary file directory and have names like
  1152. \fIoriginal_file_name\-#\-#\fR\&.
  1153. .sp .5v
  1154. .RE
  1155. .SH "MYSQLBINLOG HEX DUMP FORMAT"
  1156. .PP
  1157. The
  1158. \fB\-\-hexdump\fR
  1159. option causes
  1160. \fBmysqlbinlog\fR
  1161. to produce a hex dump of the binary log contents:
  1162. .sp
  1163. .if n \{\
  1164. .RS 4
  1165. .\}
  1166. .nf
  1167. shell> \fBmysqlbinlog \-\-hexdump master\-bin\&.000001\fR
  1168. .fi
  1169. .if n \{\
  1170. .RE
  1171. .\}
  1172. .PP
  1173. The hex output consists of comment lines beginning with
  1174. #, so the output might look like this for the preceding command:
  1175. .sp
  1176. .if n \{\
  1177. .RS 4
  1178. .\}
  1179. .nf
  1180. /*!40019 SET @@session\&.max_insert_delayed_threads=0*/;
  1181. /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
  1182. # at 4
  1183. #051024 17:24:13 server id 1 end_log_pos 98
  1184. # Position Timestamp Type Master ID Size Master Pos Flags
  1185. # 00000004 9d fc 5c 43 0f 01 00 00 00 5e 00 00 00 62 00 00 00 00 00
  1186. # 00000017 04 00 35 2e 30 2e 31 35 2d 64 65 62 75 67 2d 6c |\&.\&.5\&.0\&.15\&.debug\&.l|
  1187. # 00000027 6f 67 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |og\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.|
  1188. # 00000037 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.|
  1189. # 00000047 00 00 00 00 9d fc 5c 43 13 38 0d 00 08 00 12 00 |\&.\&.\&.\&.\&.\&.\&.C\&.8\&.\&.\&.\&.\&.\&.|
  1190. # 00000057 04 04 04 04 12 00 00 4b 00 04 1a |\&.\&.\&.\&.\&.\&.\&.K\&.\&.\&.|
  1191. # Start: binlog v 4, server v 5\&.0\&.15\-debug\-log created 051024 17:24:13
  1192. # at startup
  1193. ROLLBACK;
  1194. .fi
  1195. .if n \{\
  1196. .RE
  1197. .\}
  1198. .PP
  1199. Hex dump output currently contains the elements in the following list\&. This format is subject to change\&. (For more information about binary log format, see
  1200. \m[blue]\fB\%http://forge.mysql.com/wiki/MySQL_Internals_Binary_Log\fR\m[]\&.)
  1201. .sp
  1202. .RS 4
  1203. .ie n \{\
  1204. \h'-04'\(bu\h'+03'\c
  1205. .\}
  1206. .el \{\
  1207. .sp -1
  1208. .IP \(bu 2.3
  1209. .\}
  1210. Position: The byte position within the log file\&.
  1211. .RE
  1212. .sp
  1213. .RS 4
  1214. .ie n \{\
  1215. \h'-04'\(bu\h'+03'\c
  1216. .\}
  1217. .el \{\
  1218. .sp -1
  1219. .IP \(bu 2.3
  1220. .\}
  1221. Timestamp: The event timestamp\&. In the example shown,
  1222. \'9d fc 5c 43\'
  1223. is the representation of
  1224. \'051024 17:24:13\'
  1225. in hexadecimal\&.
  1226. .RE
  1227. .sp
  1228. .RS 4
  1229. .ie n \{\
  1230. \h'-04'\(bu\h'+03'\c
  1231. .\}
  1232. .el \{\
  1233. .sp -1
  1234. .IP \(bu 2.3
  1235. .\}
  1236. Type: The event type code\&. In the example shown,
  1237. \'0f\'
  1238. indicates a
  1239. FORMAT_DESCRIPTION_EVENT\&. The following table lists the possible type codes\&.
  1240. .TS
  1241. allbox tab(:);
  1242. l l l
  1243. l l l
  1244. l l l
  1245. l l l
  1246. l l l
  1247. l l l
  1248. l l l
  1249. l l l
  1250. l l l
  1251. l l l
  1252. l l l
  1253. l l l
  1254. l l l
  1255. l l l
  1256. l l l
  1257. l l l
  1258. l l l
  1259. l l l
  1260. l l l
  1261. l l l
  1262. l l l
  1263. l l l
  1264. l l l
  1265. l l l
  1266. l l l
  1267. l l l
  1268. l l l
  1269. l l l.
  1270. T{
  1271. Type
  1272. T}:T{
  1273. Name
  1274. T}:T{
  1275. Meaning
  1276. T}
  1277. T{
  1278. 00
  1279. T}:T{
  1280. UNKNOWN_EVENT
  1281. T}:T{
  1282. This event should never be present in the log\&.
  1283. T}
  1284. T{
  1285. 01
  1286. T}:T{
  1287. START_EVENT_V3
  1288. T}:T{
  1289. This indicates the start of a log file written by MySQL 4 or earlier\&.
  1290. T}
  1291. T{
  1292. 02
  1293. T}:T{
  1294. QUERY_EVENT
  1295. T}:T{
  1296. The most common type of events\&. These contain statements executed on the
  1297. master\&.
  1298. T}
  1299. T{
  1300. 03
  1301. T}:T{
  1302. STOP_EVENT
  1303. T}:T{
  1304. Indicates that master has stopped\&.
  1305. T}
  1306. T{
  1307. 04
  1308. T}:T{
  1309. ROTATE_EVENT
  1310. T}:T{
  1311. Written when the master switches to a new log file\&.
  1312. T}
  1313. T{
  1314. 05
  1315. T}:T{
  1316. INTVAR_EVENT
  1317. T}:T{
  1318. Used for AUTO_INCREMENT values or when the
  1319. LAST_INSERT_ID()
  1320. function is used in the statement\&.
  1321. T}
  1322. T{
  1323. 06
  1324. T}:T{
  1325. LOAD_EVENT
  1326. T}:T{
  1327. Used for LOAD DATA
  1328. INFILE in MySQL 3\&.23\&.
  1329. T}
  1330. T{
  1331. 07
  1332. T}:T{
  1333. SLAVE_EVENT
  1334. T}:T{
  1335. Reserved for future use\&.
  1336. T}
  1337. T{
  1338. 08
  1339. T}:T{
  1340. CREATE_FILE_EVENT
  1341. T}:T{
  1342. Used for LOAD DATA
  1343. INFILE statements\&. This indicates the
  1344. start of execution of such a statement\&. A temporary
  1345. file is created on the slave\&. Used in MySQL 4 only\&.
  1346. T}
  1347. T{
  1348. 09
  1349. T}:T{
  1350. APPEND_BLOCK_EVENT
  1351. T}:T{
  1352. Contains data for use in a
  1353. LOAD DATA
  1354. INFILE statement\&. The data is stored in
  1355. the temporary file on the slave\&.
  1356. T}
  1357. T{
  1358. 0a
  1359. T}:T{
  1360. EXEC_LOAD_EVENT
  1361. T}:T{
  1362. Used for LOAD DATA
  1363. INFILE statements\&. The contents of the
  1364. temporary file is stored in the table on the slave\&.
  1365. Used in MySQL 4 only\&.
  1366. T}
  1367. T{
  1368. 0b
  1369. T}:T{
  1370. DELETE_FILE_EVENT
  1371. T}:T{
  1372. Rollback of a LOAD DATA
  1373. INFILE statement\&. The temporary file
  1374. should be deleted on the slave\&.
  1375. T}
  1376. T{
  1377. 0c
  1378. T}:T{
  1379. NEW_LOAD_EVENT
  1380. T}:T{
  1381. Used for LOAD DATA
  1382. INFILE in MySQL 4 and earlier\&.
  1383. T}
  1384. T{
  1385. 0d
  1386. T}:T{
  1387. RAND_EVENT
  1388. T}:T{
  1389. Used to send information about random values if the
  1390. RAND() function is
  1391. used in the statement\&.
  1392. T}
  1393. T{
  1394. 0e
  1395. T}:T{
  1396. USER_VAR_EVENT
  1397. T}:T{
  1398. Used to replicate user variables\&.
  1399. T}
  1400. T{
  1401. 0f
  1402. T}:T{
  1403. FORMAT_DESCRIPTION_EVENT
  1404. T}:T{
  1405. This indicates the start of a log file written by MySQL 5 or later\&.
  1406. T}
  1407. T{
  1408. 10
  1409. T}:T{
  1410. XID_EVENT
  1411. T}:T{
  1412. Event indicating commit of an XA transaction\&.
  1413. T}
  1414. T{
  1415. 11
  1416. T}:T{
  1417. BEGIN_LOAD_QUERY_EVENT
  1418. T}:T{
  1419. Used for LOAD DATA
  1420. INFILE statements in MySQL 5 and later\&.
  1421. T}
  1422. T{
  1423. 12
  1424. T}:T{
  1425. EXECUTE_LOAD_QUERY_EVENT
  1426. T}:T{
  1427. Used for LOAD DATA
  1428. INFILE statements in MySQL 5 and later\&.
  1429. T}
  1430. T{
  1431. 13
  1432. T}:T{
  1433. TABLE_MAP_EVENT
  1434. T}:T{
  1435. Information about a table definition\&. Used in MySQL 5\&.1\&.5 and later\&.
  1436. T}
  1437. T{
  1438. 14
  1439. T}:T{
  1440. PRE_GA_WRITE_ROWS_EVENT
  1441. T}:T{
  1442. Row data for a single table that should be created\&. Used in MySQL 5\&.1\&.5
  1443. to 5\&.1\&.17\&.
  1444. T}
  1445. T{
  1446. 15
  1447. T}:T{
  1448. PRE_GA_UPDATE_ROWS_EVENT
  1449. T}:T{
  1450. Row data for a single table that needs to be updated\&. Used in MySQL
  1451. 5\&.1\&.5 to 5\&.1\&.17\&.
  1452. T}
  1453. T{
  1454. 16
  1455. T}:T{
  1456. PRE_GA_DELETE_ROWS_EVENT
  1457. T}:T{
  1458. Row data for a single table that should be deleted\&. Used in MySQL 5\&.1\&.5
  1459. to 5\&.1\&.17\&.
  1460. T}
  1461. T{
  1462. 17
  1463. T}:T{
  1464. WRITE_ROWS_EVENT
  1465. T}:T{
  1466. Row data for a single table that should be created\&. Used in MySQL 5\&.1\&.18
  1467. and later\&.
  1468. T}
  1469. T{
  1470. 18
  1471. T}:T{
  1472. UPDATE_ROWS_EVENT
  1473. T}:T{
  1474. Row data for a single table that needs to be updated\&. Used in MySQL
  1475. 5\&.1\&.18 and later\&.
  1476. T}
  1477. T{
  1478. 19
  1479. T}:T{
  1480. DELETE_ROWS_EVENT
  1481. T}:T{
  1482. Row data for a single table that should be deleted\&. Used in MySQL 5\&.1\&.18
  1483. and later\&.
  1484. T}
  1485. T{
  1486. 1a
  1487. T}:T{
  1488. INCIDENT_EVENT
  1489. T}:T{
  1490. Something out of the ordinary happened\&. Added in MySQL 5\&.1\&.18\&.
  1491. T}
  1492. .TE
  1493. .sp 1
  1494. .RE
  1495. .sp
  1496. .RS 4
  1497. .ie n \{\
  1498. \h'-04'\(bu\h'+03'\c
  1499. .\}
  1500. .el \{\
  1501. .sp -1
  1502. .IP \(bu 2.3
  1503. .\}
  1504. Master ID: The server ID of the master that created the event\&.
  1505. .RE
  1506. .sp
  1507. .RS 4
  1508. .ie n \{\
  1509. \h'-04'\(bu\h'+03'\c
  1510. .\}
  1511. .el \{\
  1512. .sp -1
  1513. .IP \(bu 2.3
  1514. .\}
  1515. Size: The size in bytes of the event\&.
  1516. .RE
  1517. .sp
  1518. .RS 4
  1519. .ie n \{\
  1520. \h'-04'\(bu\h'+03'\c
  1521. .\}
  1522. .el \{\
  1523. .sp -1
  1524. .IP \(bu 2.3
  1525. .\}
  1526. Master Pos: The position of the next event in the original master log file\&.
  1527. .RE
  1528. .sp
  1529. .RS 4
  1530. .ie n \{\
  1531. \h'-04'\(bu\h'+03'\c
  1532. .\}
  1533. .el \{\
  1534. .sp -1
  1535. .IP \(bu 2.3
  1536. .\}
  1537. Flags: 16 flags\&. Currently, the following flags are used\&. The others are reserved for future use\&.
  1538. .TS
  1539. allbox tab(:);
  1540. l l l
  1541. l l l
  1542. l l l
  1543. l l l
  1544. l l l.
  1545. T{
  1546. Flag
  1547. T}:T{
  1548. Name
  1549. T}:T{
  1550. Meaning
  1551. T}
  1552. T{
  1553. 01
  1554. T}:T{
  1555. LOG_EVENT_BINLOG_IN_USE_F
  1556. T}:T{
  1557. Log file correctly closed\&. (Used only in
  1558. FORMAT_DESCRIPTION_EVENT\&.) If
  1559. this flag is set (if the flags are, for example,
  1560. \'01 00\') in a
  1561. FORMAT_DESCRIPTION_EVENT, the log
  1562. file has not been properly closed\&. Most probably
  1563. this is because of a master crash (for example, due
  1564. to power failure)\&.
  1565. T}
  1566. T{
  1567. 02
  1568. T}:T{
  1569. \ \&
  1570. T}:T{
  1571. Reserved for future use\&.
  1572. T}
  1573. T{
  1574. 04
  1575. T}:T{
  1576. LOG_EVENT_THREAD_SPECIFIC_F
  1577. T}:T{
  1578. Set if the event is dependent on the connection it was executed in (for
  1579. example, \'04 00\'), for example,
  1580. if the event uses temporary tables\&.
  1581. T}
  1582. T{
  1583. 08
  1584. T}:T{
  1585. LOG_EVENT_SUPPRESS_USE_F
  1586. T}:T{
  1587. Set in some circumstances when the event is not dependent on the default
  1588. database\&.
  1589. T}
  1590. .TE
  1591. .sp 1
  1592. .RE
  1593. .SH "MYSQLBINLOG ROW EVENT DISPLAY"
  1594. .\" BINLOG statement: mysqlbinlog output
  1595. .PP
  1596. The following examples illustrate how
  1597. \fBmysqlbinlog\fR
  1598. displays row events that specify data modifications\&. These correspond to events with the
  1599. WRITE_ROWS_EVENT,
  1600. UPDATE_ROWS_EVENT, and
  1601. DELETE_ROWS_EVENT
  1602. type codes\&. The
  1603. \fB\-\-base64\-output=DECODE\-ROWS\fR
  1604. and
  1605. \fB\-\-verbose\fR
  1606. options may be used to affect row event output\&. These options are available as of MySQL 5\&.1\&.28\&.
  1607. .PP
  1608. Suppose that the server is using row\-based binary logging and that you execute the following sequence of statements:
  1609. .sp
  1610. .if n \{\
  1611. .RS 4
  1612. .\}
  1613. .nf
  1614. CREATE TABLE t
  1615. (
  1616. id INT NOT NULL,
  1617. name VARCHAR(20) NOT NULL,
  1618. date DATE NULL
  1619. ) ENGINE = InnoDB;
  1620. START TRANSACTION;
  1621. INSERT INTO t VALUES(1, \'apple\', NULL);
  1622. UPDATE t SET name = \'pear\', date = \'2009\-01\-01\' WHERE id = 1;
  1623. DELETE FROM t WHERE id = 1;
  1624. COMMIT;
  1625. .fi
  1626. .if n \{\
  1627. .RE
  1628. .\}
  1629. .PP
  1630. By default,
  1631. \fBmysqlbinlog\fR
  1632. displays row events encoded as base\-64 strings using
  1633. BINLOG
  1634. statements\&. Omitting extraneous lines, the output for the row events produced by the preceding statement sequence looks like this:
  1635. .sp
  1636. .if n \{\
  1637. .RS 4
  1638. .\}
  1639. .nf
  1640. shell> \fBmysqlbinlog \fR\fB\fIlog_file\fR\fR
  1641. \&.\&.\&.
  1642. # at 218
  1643. #080828 15:03:08 server id 1 end_log_pos 258 Write_rows: table id 17 flags: STMT_END_F
  1644. BINLOG \'
  1645. fAS3SBMBAAAALAAAANoAAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ=
  1646. fAS3SBcBAAAAKAAAAAIBAAAQABEAAAAAAAEAA//8AQAAAAVhcHBsZQ==
  1647. \'/*!*/;
  1648. \&.\&.\&.
  1649. # at 302
  1650. #080828 15:03:08 server id 1 end_log_pos 356 Update_rows: table id 17 flags: STMT_END_F
  1651. BINLOG \'
  1652. fAS3SBMBAAAALAAAAC4BAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ=
  1653. fAS3SBgBAAAANgAAAGQBAAAQABEAAAAAAAEAA////AEAAAAFYXBwbGX4AQAAAARwZWFyIbIP
  1654. \'/*!*/;
  1655. \&.\&.\&.
  1656. # at 400
  1657. #080828 15:03:08 server id 1 end_log_pos 442 Delete_rows: table id 17 flags: STMT_END_F
  1658. BINLOG \'
  1659. fAS3SBMBAAAALAAAAJABAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ=
  1660. fAS3SBkBAAAAKgAAALoBAAAQABEAAAAAAAEAA//4AQAAAARwZWFyIbIP
  1661. \'/*!*/;
  1662. .fi
  1663. .if n \{\
  1664. .RE
  1665. .\}
  1666. .PP
  1667. To see the row events as comments in the form of
  1668. \(lqpseudo\-SQL\(rq
  1669. statements, run
  1670. \fBmysqlbinlog\fR
  1671. with the
  1672. \fB\-\-verbose\fR
  1673. or
  1674. \fB\-v\fR
  1675. option\&. The output will contain lines beginning with
  1676. ###:
  1677. .sp
  1678. .if n \{\
  1679. .RS 4
  1680. .\}
  1681. .nf
  1682. shell> \fBmysqlbinlog \-v \fR\fB\fIlog_file\fR\fR
  1683. \&.\&.\&.
  1684. # at 218
  1685. #080828 15:03:08 server id 1 end_log_pos 258 Write_rows: table id 17 flags: STMT_END_F
  1686. BINLOG \'
  1687. fAS3SBMBAAAALAAAANoAAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ=
  1688. fAS3SBcBAAAAKAAAAAIBAAAQABEAAAAAAAEAA//8AQAAAAVhcHBsZQ==
  1689. \'/*!*/;
  1690. ### INSERT INTO test\&.t
  1691. ### SET
  1692. ### @1=1
  1693. ### @2=\'apple\'
  1694. ### @3=NULL
  1695. \&.\&.\&.
  1696. # at 302
  1697. #080828 15:03:08 server id 1 end_log_pos 356 Update_rows: table id 17 flags: STMT_END_F
  1698. BINLOG \'
  1699. fAS3SBMBAAAALAAAAC4BAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ=
  1700. fAS3SBgBAAAANgAAAGQBAAAQABEAAAAAAAEAA////AEAAAAFYXBwbGX4AQAAAARwZWFyIbIP
  1701. \'/*!*/;
  1702. ### UPDATE test\&.t
  1703. ### WHERE
  1704. ### @1=1
  1705. ### @2=\'apple\'
  1706. ### @3=NULL
  1707. ### SET
  1708. ### @1=1
  1709. ### @2=\'pear\'
  1710. ### @3=\'2009:01:01\'
  1711. \&.\&.\&.
  1712. # at 400
  1713. #080828 15:03:08 server id 1 end_log_pos 442 Delete_rows: table id 17 flags: STMT_END_F
  1714. BINLOG \'
  1715. fAS3SBMBAAAALAAAAJABAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ=
  1716. fAS3SBkBAAAAKgAAALoBAAAQABEAAAAAAAEAA//4AQAAAARwZWFyIbIP
  1717. \'/*!*/;
  1718. ### DELETE FROM test\&.t
  1719. ### WHERE
  1720. ### @1=1
  1721. ### @2=\'pear\'
  1722. ### @3=\'2009:01:01\'
  1723. .fi
  1724. .if n \{\
  1725. .RE
  1726. .\}
  1727. .PP
  1728. Specify
  1729. \fB\-\-verbose\fR
  1730. or
  1731. \fB\-v\fR
  1732. twice to also display data types and some metadata for each column\&. The output will contain an additional comment following each column change:
  1733. .sp
  1734. .if n \{\
  1735. .RS 4
  1736. .\}
  1737. .nf
  1738. shell> \fBmysqlbinlog \-vv \fR\fB\fIlog_file\fR\fR
  1739. \&.\&.\&.
  1740. # at 218
  1741. #080828 15:03:08 server id 1 end_log_pos 258 Write_rows: table id 17 flags: STMT_END_F
  1742. BINLOG \'
  1743. fAS3SBMBAAAALAAAANoAAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ=
  1744. fAS3SBcBAAAAKAAAAAIBAAAQABEAAAAAAAEAA//8AQAAAAVhcHBsZQ==
  1745. \'/*!*/;
  1746. ### INSERT INTO test\&.t
  1747. ### SET
  1748. ### @1=1 /* INT meta=0 nullable=0 is_null=0 */
  1749. ### @2=\'apple\' /* VARSTRING(20) meta=20 nullable=0 is_null=0 */
  1750. ### @3=NULL /* VARSTRING(20) meta=0 nullable=1 is_null=1 */
  1751. \&.\&.\&.
  1752. # at 302
  1753. #080828 15:03:08 server id 1 end_log_pos 356 Update_rows: table id 17 flags: STMT_END_F
  1754. BINLOG \'
  1755. fAS3SBMBAAAALAAAAC4BAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ=
  1756. fAS3SBgBAAAANgAAAGQBAAAQABEAAAAAAAEAA////AEAAAAFYXBwbGX4AQAAAARwZWFyIbIP
  1757. \'/*!*/;
  1758. ### UPDATE test\&.t
  1759. ### WHERE
  1760. ### @1=1 /* INT meta=0 nullable=0 is_null=0 */
  1761. ### @2=\'apple\' /* VARSTRING(20) meta=20 nullable=0 is_null=0 */
  1762. ### @3=NULL /* VARSTRING(20) meta=0 nullable=1 is_null=1 */
  1763. ### SET
  1764. ### @1=1 /* INT meta=0 nullable=0 is_null=0 */
  1765. ### @2=\'pear\' /* VARSTRING(20) meta=20 nullable=0 is_null=0 */
  1766. ### @3=\'2009:01:01\' /* DATE meta=0 nullable=1 is_null=0 */
  1767. \&.\&.\&.
  1768. # at 400
  1769. #080828 15:03:08 server id 1 end_log_pos 442 Delete_rows: table id 17 flags: STMT_END_F
  1770. BINLOG \'
  1771. fAS3SBMBAAAALAAAAJABAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ=
  1772. fAS3SBkBAAAAKgAAALoBAAAQABEAAAAAAAEAA//4AQAAAARwZWFyIbIP
  1773. \'/*!*/;
  1774. ### DELETE FROM test\&.t
  1775. ### WHERE
  1776. ### @1=1 /* INT meta=0 nullable=0 is_null=0 */
  1777. ### @2=\'pear\' /* VARSTRING(20) meta=20 nullable=0 is_null=0 */
  1778. ### @3=\'2009:01:01\' /* DATE meta=0 nullable=1 is_null=0 */
  1779. .fi
  1780. .if n \{\
  1781. .RE
  1782. .\}
  1783. .PP
  1784. You can tell
  1785. \fBmysqlbinlog\fR
  1786. to suppress the
  1787. BINLOG
  1788. statements for row events by using the
  1789. \fB\-\-base64\-output=DECODE\-ROWS\fR
  1790. option\&. This is similar to
  1791. \fB\-\-base64\-output=NEVER\fR
  1792. but does not exit with an error if a row event is found\&. The combination of
  1793. \fB\-\-base64\-output=DECODE\-ROWS\fR
  1794. and
  1795. \fB\-\-verbose\fR
  1796. provides a convenient way to see row events only as SQL statements:
  1797. .sp
  1798. .if n \{\
  1799. .RS 4
  1800. .\}
  1801. .nf
  1802. shell> \fBmysqlbinlog \-v \-\-base64\-output=DECODE\-ROWS \fR\fB\fIlog_file\fR\fR
  1803. \&.\&.\&.
  1804. # at 218
  1805. #080828 15:03:08 server id 1 end_log_pos 258 Write_rows: table id 17 flags: STMT_END_F
  1806. ### INSERT INTO test\&.t
  1807. ### SET
  1808. ### @1=1
  1809. ### @2=\'apple\'
  1810. ### @3=NULL
  1811. \&.\&.\&.
  1812. # at 302
  1813. #080828 15:03:08 server id 1 end_log_pos 356 Update_rows: table id 17 flags: STMT_END_F
  1814. ### UPDATE test\&.t
  1815. ### WHERE
  1816. ### @1=1
  1817. ### @2=\'apple\'
  1818. ### @3=NULL
  1819. ### SET
  1820. ### @1=1
  1821. ### @2=\'pear\'
  1822. ### @3=\'2009:01:01\'
  1823. \&.\&.\&.
  1824. # at 400
  1825. #080828 15:03:08 server id 1 end_log_pos 442 Delete_rows: table id 17 flags: STMT_END_F
  1826. ### DELETE FROM test\&.t
  1827. ### WHERE
  1828. ### @1=1
  1829. ### @2=\'pear\'
  1830. ### @3=\'2009:01:01\'
  1831. .fi
  1832. .if n \{\
  1833. .RE
  1834. .\}
  1835. .sp
  1836. .if n \{\
  1837. .sp
  1838. .\}
  1839. .RS 4
  1840. .it 1 an-trap
  1841. .nr an-no-space-flag 1
  1842. .nr an-break-flag 1
  1843. .br
  1844. .ps +1
  1845. \fBNote\fR
  1846. .ps -1
  1847. .br
  1848. .PP
  1849. You should not suppress
  1850. BINLOG
  1851. statements if you intend to re\-execute
  1852. \fBmysqlbinlog\fR
  1853. output\&.
  1854. .sp .5v
  1855. .RE
  1856. .PP
  1857. The SQL statements produced by
  1858. \fB\-\-verbose\fR
  1859. for row events are much more readable than the corresponding
  1860. BINLOG
  1861. statements\&. However, they do not correspond exactly to the original SQL statements that generated the events\&. The following limitations apply:
  1862. .sp
  1863. .RS 4
  1864. .ie n \{\
  1865. \h'-04'\(bu\h'+03'\c
  1866. .\}
  1867. .el \{\
  1868. .sp -1
  1869. .IP \(bu 2.3
  1870. .\}
  1871. The original column names are lost and replaced by
  1872. @\fIN\fR, where
  1873. \fIN\fR
  1874. is a column number\&.
  1875. .RE
  1876. .sp
  1877. .RS 4
  1878. .ie n \{\
  1879. \h'-04'\(bu\h'+03'\c
  1880. .\}
  1881. .el \{\
  1882. .sp -1
  1883. .IP \(bu 2.3
  1884. .\}
  1885. Character set information is not available in the binary log, which affects string column display:
  1886. .sp
  1887. .RS 4
  1888. .ie n \{\
  1889. \h'-04'\(bu\h'+03'\c
  1890. .\}
  1891. .el \{\
  1892. .sp -1
  1893. .IP \(bu 2.3
  1894. .\}
  1895. There is no distinction made between corresponding binary and nonbinary string types (BINARY
  1896. and
  1897. CHAR,
  1898. VARBINARY
  1899. and
  1900. VARCHAR,
  1901. BLOB
  1902. and
  1903. TEXT)\&. The output uses a data type of
  1904. STRING
  1905. for fixed\-length strings and
  1906. VARSTRING
  1907. for variable\-length strings\&.
  1908. .RE
  1909. .sp
  1910. .RS 4
  1911. .ie n \{\
  1912. \h'-04'\(bu\h'+03'\c
  1913. .\}
  1914. .el \{\
  1915. .sp -1
  1916. .IP \(bu 2.3
  1917. .\}
  1918. For multi\-byte character sets, the maximum number of bytes per character is not present in the binary log, so the length for string types is displayed in bytes rather than in characters\&. For example,
  1919. STRING(4)
  1920. will be used as the data type for values from either of these column types:
  1921. .sp
  1922. .if n \{\
  1923. .RS 4
  1924. .\}
  1925. .nf
  1926. CHAR(4) CHARACTER SET latin1
  1927. CHAR(2) CHARACTER SET ucs2
  1928. .fi
  1929. .if n \{\
  1930. .RE
  1931. .\}
  1932. .RE
  1933. .sp
  1934. .RS 4
  1935. .ie n \{\
  1936. \h'-04'\(bu\h'+03'\c
  1937. .\}
  1938. .el \{\
  1939. .sp -1
  1940. .IP \(bu 2.3
  1941. .\}
  1942. Due to the storage format for events of type
  1943. UPDATE_ROWS_EVENT,
  1944. UPDATE
  1945. statements are displayed with the
  1946. WHERE
  1947. clause preceding the
  1948. SET
  1949. clause\&.
  1950. .RE
  1951. .RE
  1952. .PP
  1953. Proper interpretation of row events requires the information from the format description event at the beginning of the binary log\&. Because
  1954. \fBmysqlbinlog\fR
  1955. does not know in advance whether the rest of the log contains row events, by default it displays the format description event using a
  1956. BINLOG
  1957. statement in the initial part of the output\&.
  1958. .PP
  1959. If the binary log is known not to contain any events requiring a
  1960. BINLOG
  1961. statement (that is, no row events), the
  1962. \fB\-\-base64\-output=NEVER\fR
  1963. option can be used to prevent this header from being written\&.
  1964. .SH "COPYRIGHT"
  1965. .br
  1966. .PP
  1967. Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
  1968. .PP
  1969. This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
  1970. .PP
  1971. This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  1972. .PP
  1973. You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
  1974. .sp
  1975. .SH "NOTES"
  1976. .IP " 1." 4
  1977. Bug#42941
  1978. .RS 4
  1979. \%http://bugs.mysql.com/bug.php?id=42941
  1980. .RE
  1981. .SH "SEE ALSO"
  1982. For more information, please refer to the MySQL Reference Manual,
  1983. which may already be installed locally and which is also available
  1984. online at http://dev.mysql.com/doc/.
  1985. .SH AUTHOR
  1986. Sun Microsystems, Inc. (http://www.mysql.com/).