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.

878 lines
19 KiB

  1. '\" t
  2. .\" Title: \fBmysqlcheck\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 "\FBMYSQLCHECK\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. .\" mysqlcheck
  22. .\" maintenance: tables
  23. .\" repair: tables
  24. .\" tables: maintenance
  25. .\" tables: repair
  26. .SH "NAME"
  27. mysqlcheck \- a table maintenance program
  28. .SH "SYNOPSIS"
  29. .HP \w'\fBmysqlcheck\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fIdb_name\fR\fR\fB\ [\fR\fB\fItbl_name\fR\fR\fB\ \&.\&.\&.]]\fR\ 'u
  30. \fBmysqlcheck [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fItbl_name\fR\fR\fB \&.\&.\&.]]\fR
  31. .SH "DESCRIPTION"
  32. .PP
  33. The
  34. \fBmysqlcheck\fR
  35. client performs table maintenance: It checks, repairs, optimizes, or analyzes tables\&.
  36. .PP
  37. Each table is locked and therefore unavailable to other sessions while it is being processed, although for check operations, the table is locked with a
  38. READ
  39. lock only (see
  40. Section\ \&12.3.5, \(lqLOCK TABLES and UNLOCK TABLES Syntax\(rq, for more information about
  41. READ
  42. and
  43. WRITE
  44. locks)\&. Table maintenance operations can be time\-consuming, particularly for large tables\&. If you use the
  45. \fB\-\-databases\fR
  46. or
  47. \fB\-\-all\-databases\fR
  48. option to process all tables in one or more databases, an invocation of
  49. \fBmysqlcheck\fR
  50. might take a long time\&. (This is also true for
  51. \fBmysql_upgrade\fR
  52. because that program invokes
  53. \fBmysqlcheck\fR
  54. to check all tables and repair them if necessary\&.)
  55. .PP
  56. \fBmysqlcheck\fR
  57. is similar in function to
  58. \fBmyisamchk\fR, but works differently\&. The main operational difference is that
  59. \fBmysqlcheck\fR
  60. must be used when the
  61. \fBmysqld\fR
  62. server is running, whereas
  63. \fBmyisamchk\fR
  64. should be used when it is not\&. The benefit of using
  65. \fBmysqlcheck\fR
  66. is that you do not have to stop the server to perform table maintenance\&.
  67. .PP
  68. \fBmysqlcheck\fR
  69. uses the SQL statements
  70. CHECK TABLE,
  71. REPAIR TABLE,
  72. ANALYZE TABLE, and
  73. OPTIMIZE TABLE
  74. in a convenient way for the user\&. It determines which statements to use for the operation you want to perform, and then sends the statements to the server to be executed\&. For details about which storage engines each statement works with, see the descriptions for those statements in
  75. Section\ \&12.4.2, \(lqTable Maintenance Statements\(rq\&.
  76. .PP
  77. The
  78. MyISAM
  79. storage engine supports all four maintenance operations, so
  80. \fBmysqlcheck\fR
  81. can be used to perform any of them on
  82. MyISAM
  83. tables\&. Other storage engines do not necessarily support all operations\&. In such cases, an error message is displayed\&. For example, if
  84. test\&.t
  85. is a
  86. MEMORY
  87. table, an attempt to check it produces this result:
  88. .sp
  89. .if n \{\
  90. .RS 4
  91. .\}
  92. .nf
  93. shell> \fBmysqlcheck test t\fR
  94. test\&.t
  95. note : The storage engine for the table doesn\'t support check
  96. .fi
  97. .if n \{\
  98. .RE
  99. .\}
  100. .PP
  101. If
  102. \fBmysqlcheck\fR
  103. is unable to repair a table, see
  104. Section\ \&2.4.4, \(lqRebuilding or Repairing Tables or Indexes\(rq
  105. for manual table repair strategies\&. This will be the case, for example, for
  106. InnoDB
  107. tables, which can be checked with
  108. CHECK TABLE, but not repaired with
  109. REPAIR TABLE\&.
  110. .PP
  111. The use of
  112. \fBmysqlcheck\fR
  113. with partitioned tables is not supported before MySQL 5\&.1\&.27\&.
  114. .if n \{\
  115. .sp
  116. .\}
  117. .RS 4
  118. .it 1 an-trap
  119. .nr an-no-space-flag 1
  120. .nr an-break-flag 1
  121. .br
  122. .ps +1
  123. \fBCaution\fR
  124. .ps -1
  125. .br
  126. .PP
  127. It is best to make a backup of a table before performing a table repair operation; under some circumstances the operation might cause data loss\&. Possible causes include but are not limited to file system errors\&.
  128. .sp .5v
  129. .RE
  130. .PP
  131. There are three general ways to invoke
  132. \fBmysqlcheck\fR:
  133. .sp
  134. .if n \{\
  135. .RS 4
  136. .\}
  137. .nf
  138. shell> \fBmysqlcheck [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fItbl_name\fR\fR\fB \&.\&.\&.]\fR
  139. shell> \fBmysqlcheck [\fR\fB\fIoptions\fR\fR\fB] \-\-databases \fR\fB\fIdb_name\fR\fR\fB \&.\&.\&.\fR
  140. shell> \fBmysqlcheck [\fR\fB\fIoptions\fR\fR\fB] \-\-all\-databases\fR
  141. .fi
  142. .if n \{\
  143. .RE
  144. .\}
  145. .PP
  146. If you do not name any tables following
  147. \fIdb_name\fR
  148. or if you use the
  149. \fB\-\-databases\fR
  150. or
  151. \fB\-\-all\-databases\fR
  152. option, entire databases are checked\&.
  153. .PP
  154. \fBmysqlcheck\fR
  155. has a special feature compared to other client programs\&. The default behavior of checking tables (\fB\-\-check\fR) can be changed by renaming the binary\&. If you want to have a tool that repairs tables by default, you should just make a copy of
  156. \fBmysqlcheck\fR
  157. named
  158. \fBmysqlrepair\fR, or make a symbolic link to
  159. \fBmysqlcheck\fR
  160. named
  161. \fBmysqlrepair\fR\&. If you invoke
  162. \fBmysqlrepair\fR, it repairs tables\&.
  163. .PP
  164. The following names can be used to change
  165. \fBmysqlcheck\fR
  166. default behavior\&.
  167. .TS
  168. allbox tab(:);
  169. l l
  170. l l
  171. l l.
  172. T{
  173. \fBmysqlrepair\fR
  174. T}:T{
  175. The default option is \fB\-\-repair\fR
  176. T}
  177. T{
  178. \fBmysqlanalyze\fR
  179. T}:T{
  180. The default option is \fB\-\-analyze\fR
  181. T}
  182. T{
  183. \fBmysqloptimize\fR
  184. T}:T{
  185. The default option is \fB\-\-optimize\fR
  186. T}
  187. .TE
  188. .sp 1
  189. .PP
  190. \fBmysqlcheck\fR
  191. supports the following options, which can be specified on the command line or in the
  192. [mysqlcheck]
  193. and
  194. [client]
  195. option file groups\&.
  196. \fBmysqlcheck\fR
  197. also supports the options for processing option files described at
  198. Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
  199. .sp
  200. .RS 4
  201. .ie n \{\
  202. \h'-04'\(bu\h'+03'\c
  203. .\}
  204. .el \{\
  205. .sp -1
  206. .IP \(bu 2.3
  207. .\}
  208. .\" mysqlcheck: help option
  209. .\" help option: mysqlcheck
  210. \fB\-\-help\fR,
  211. \fB\-?\fR
  212. .sp
  213. Display a help message and exit\&.
  214. .RE
  215. .sp
  216. .RS 4
  217. .ie n \{\
  218. \h'-04'\(bu\h'+03'\c
  219. .\}
  220. .el \{\
  221. .sp -1
  222. .IP \(bu 2.3
  223. .\}
  224. .\" mysqlcheck: all-databases option
  225. .\" all-databases option: mysqlcheck
  226. \fB\-\-all\-databases\fR,
  227. \fB\-A\fR
  228. .sp
  229. Check all tables in all databases\&. This is the same as using the
  230. \fB\-\-databases\fR
  231. option and naming all the databases on the command line\&.
  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. .\" mysqlcheck: all-in-1 option
  243. .\" all-in-1 option: mysqlcheck
  244. \fB\-\-all\-in\-1\fR,
  245. \fB\-1\fR
  246. .sp
  247. Instead of issuing a statement for each table, execute a single statement for each database that names all the tables from that database to be processed\&.
  248. .RE
  249. .sp
  250. .RS 4
  251. .ie n \{\
  252. \h'-04'\(bu\h'+03'\c
  253. .\}
  254. .el \{\
  255. .sp -1
  256. .IP \(bu 2.3
  257. .\}
  258. .\" mysqlcheck: analyze option
  259. .\" analyze option: mysqlcheck
  260. \fB\-\-analyze\fR,
  261. \fB\-a\fR
  262. .sp
  263. Analyze the tables\&.
  264. .RE
  265. .sp
  266. .RS 4
  267. .ie n \{\
  268. \h'-04'\(bu\h'+03'\c
  269. .\}
  270. .el \{\
  271. .sp -1
  272. .IP \(bu 2.3
  273. .\}
  274. .\" mysqlcheck: auto-repair option
  275. .\" auto-repair option: mysqlcheck
  276. \fB\-\-auto\-repair\fR
  277. .sp
  278. If a checked table is corrupted, automatically fix it\&. Any necessary repairs are done after all tables have been checked\&.
  279. .RE
  280. .sp
  281. .RS 4
  282. .ie n \{\
  283. \h'-04'\(bu\h'+03'\c
  284. .\}
  285. .el \{\
  286. .sp -1
  287. .IP \(bu 2.3
  288. .\}
  289. .\" mysqlcheck: character-sets-dir option
  290. .\" character-sets-dir option: mysqlcheck
  291. \fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
  292. .sp
  293. The directory where character sets are installed\&. See
  294. Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
  295. .RE
  296. .sp
  297. .RS 4
  298. .ie n \{\
  299. \h'-04'\(bu\h'+03'\c
  300. .\}
  301. .el \{\
  302. .sp -1
  303. .IP \(bu 2.3
  304. .\}
  305. .\" mysqlcheck: check option
  306. .\" check option: mysqlcheck
  307. \fB\-\-check\fR,
  308. \fB\-c\fR
  309. .sp
  310. Check the tables for errors\&. This is the default operation\&.
  311. .RE
  312. .sp
  313. .RS 4
  314. .ie n \{\
  315. \h'-04'\(bu\h'+03'\c
  316. .\}
  317. .el \{\
  318. .sp -1
  319. .IP \(bu 2.3
  320. .\}
  321. .\" mysqlcheck: check-only-changed option
  322. .\" check-only-changed option: mysqlcheck
  323. \fB\-\-check\-only\-changed\fR,
  324. \fB\-C\fR
  325. .sp
  326. Check only tables that have changed since the last check or that have not been closed properly\&.
  327. .RE
  328. .sp
  329. .RS 4
  330. .ie n \{\
  331. \h'-04'\(bu\h'+03'\c
  332. .\}
  333. .el \{\
  334. .sp -1
  335. .IP \(bu 2.3
  336. .\}
  337. .\" mysqlcheck: check-upgrade option
  338. .\" check-upgrade option: mysqlcheck
  339. \fB\-\-check\-upgrade\fR,
  340. \fB\-g\fR
  341. .sp
  342. Invoke
  343. CHECK TABLE
  344. with the
  345. FOR UPGRADE
  346. option to check tables for incompatibilities with the current version of the server\&. This option automatically enables the
  347. \fB\-\-fix\-db\-names\fR
  348. and
  349. \fB\-\-fix\-table\-names\fR
  350. options\&.
  351. \fB\-\-check\-upgrade\fR
  352. was added in MySQL 5\&.1\&.7\&.
  353. .RE
  354. .sp
  355. .RS 4
  356. .ie n \{\
  357. \h'-04'\(bu\h'+03'\c
  358. .\}
  359. .el \{\
  360. .sp -1
  361. .IP \(bu 2.3
  362. .\}
  363. .\" mysqlcheck: compress option
  364. .\" compress option: mysqlcheck
  365. \fB\-\-compress\fR
  366. .sp
  367. Compress all information sent between the client and the server if both support compression\&.
  368. .RE
  369. .sp
  370. .RS 4
  371. .ie n \{\
  372. \h'-04'\(bu\h'+03'\c
  373. .\}
  374. .el \{\
  375. .sp -1
  376. .IP \(bu 2.3
  377. .\}
  378. .\" mysqlcheck: databases option
  379. .\" databases option: mysqlcheck
  380. \fB\-\-databases\fR,
  381. \fB\-B\fR
  382. .sp
  383. Process all tables in the named databases\&. Normally,
  384. \fBmysqlcheck\fR
  385. treats the first name argument on the command line as a database name and following names as table names\&. With this option, it treats all name arguments as database names\&.
  386. .RE
  387. .sp
  388. .RS 4
  389. .ie n \{\
  390. \h'-04'\(bu\h'+03'\c
  391. .\}
  392. .el \{\
  393. .sp -1
  394. .IP \(bu 2.3
  395. .\}
  396. .\" mysqlcheck: debug option
  397. .\" debug option: mysqlcheck
  398. \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR,
  399. \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR
  400. .sp
  401. Write a debugging log\&. A typical
  402. \fIdebug_options\fR
  403. string is
  404. \'d:t:o,\fIfile_name\fR\'\&. The default is
  405. \'d:t:o\'\&.
  406. .RE
  407. .sp
  408. .RS 4
  409. .ie n \{\
  410. \h'-04'\(bu\h'+03'\c
  411. .\}
  412. .el \{\
  413. .sp -1
  414. .IP \(bu 2.3
  415. .\}
  416. .\" mysqlcheck: debug-check option
  417. .\" debug-check option: mysqlcheck
  418. \fB\-\-debug\-check\fR
  419. .sp
  420. Print some debugging information when the program exits\&. This option was added in MySQL 5\&.1\&.21\&.
  421. .RE
  422. .sp
  423. .RS 4
  424. .ie n \{\
  425. \h'-04'\(bu\h'+03'\c
  426. .\}
  427. .el \{\
  428. .sp -1
  429. .IP \(bu 2.3
  430. .\}
  431. .\" mysqlcheck: debug-info option
  432. .\" debug-info option: mysqlcheck
  433. \fB\-\-debug\-info\fR
  434. .sp
  435. Print debugging information and memory and CPU usage statistics when the program exits\&. This option was added in MySQL 5\&.1\&.14\&.
  436. .RE
  437. .sp
  438. .RS 4
  439. .ie n \{\
  440. \h'-04'\(bu\h'+03'\c
  441. .\}
  442. .el \{\
  443. .sp -1
  444. .IP \(bu 2.3
  445. .\}
  446. .\" mysqlcheck: default-character-set option
  447. .\" default-character-set option: mysqlcheck
  448. \fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR
  449. .sp
  450. Use
  451. \fIcharset_name\fR
  452. as the default character set\&. See
  453. Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
  454. .RE
  455. .sp
  456. .RS 4
  457. .ie n \{\
  458. \h'-04'\(bu\h'+03'\c
  459. .\}
  460. .el \{\
  461. .sp -1
  462. .IP \(bu 2.3
  463. .\}
  464. .\" mysqlcheck: extended option
  465. .\" extended option: mysqlcheck
  466. \fB\-\-extended\fR,
  467. \fB\-e\fR
  468. .sp
  469. If you are using this option to check tables, it ensures that they are 100% consistent but takes a long time\&.
  470. .sp
  471. If you are using this option to repair tables, it runs an extended repair that may not only take a long time to execute, but may produce a lot of garbage rows also!
  472. .RE
  473. .sp
  474. .RS 4
  475. .ie n \{\
  476. \h'-04'\(bu\h'+03'\c
  477. .\}
  478. .el \{\
  479. .sp -1
  480. .IP \(bu 2.3
  481. .\}
  482. .\" mysqlcheck: fast option
  483. .\" fast option: mysqlcheck
  484. \fB\-\-fast\fR,
  485. \fB\-F\fR
  486. .sp
  487. Check only tables that have not been closed properly\&.
  488. .RE
  489. .sp
  490. .RS 4
  491. .ie n \{\
  492. \h'-04'\(bu\h'+03'\c
  493. .\}
  494. .el \{\
  495. .sp -1
  496. .IP \(bu 2.3
  497. .\}
  498. .\" mysqlcheck: fix-db-names option
  499. .\" fix-db-names option: mysqlcheck
  500. \fB\-\-fix\-db\-names\fR
  501. .sp
  502. Convert database names to 5\&.1 format\&. Only database names that contain special characters are affected\&. This option was added in MySQL 5\&.1\&.7\&.
  503. .RE
  504. .sp
  505. .RS 4
  506. .ie n \{\
  507. \h'-04'\(bu\h'+03'\c
  508. .\}
  509. .el \{\
  510. .sp -1
  511. .IP \(bu 2.3
  512. .\}
  513. .\" mysqlcheck: fix-table-names option
  514. .\" fix-table-names option: mysqlcheck
  515. \fB\-\-fix\-table\-names\fR
  516. .sp
  517. Convert table names to 5\&.1 format\&. Only table names that contain special characters are affected\&. This option was added in MySQL 5\&.1\&.7\&. As of MySQL 5\&.1\&.23, this option also applies to views\&.
  518. .RE
  519. .sp
  520. .RS 4
  521. .ie n \{\
  522. \h'-04'\(bu\h'+03'\c
  523. .\}
  524. .el \{\
  525. .sp -1
  526. .IP \(bu 2.3
  527. .\}
  528. .\" mysqlcheck: force option
  529. .\" force option: mysqlcheck
  530. \fB\-\-force\fR,
  531. \fB\-f\fR
  532. .sp
  533. Continue even if an SQL error occurs\&.
  534. .RE
  535. .sp
  536. .RS 4
  537. .ie n \{\
  538. \h'-04'\(bu\h'+03'\c
  539. .\}
  540. .el \{\
  541. .sp -1
  542. .IP \(bu 2.3
  543. .\}
  544. .\" mysqlcheck: host option
  545. .\" host option: mysqlcheck
  546. \fB\-\-host=\fR\fB\fIhost_name\fR\fR,
  547. \fB\-h \fR\fB\fIhost_name\fR\fR
  548. .sp
  549. Connect to the MySQL server on the given host\&.
  550. .RE
  551. .sp
  552. .RS 4
  553. .ie n \{\
  554. \h'-04'\(bu\h'+03'\c
  555. .\}
  556. .el \{\
  557. .sp -1
  558. .IP \(bu 2.3
  559. .\}
  560. .\" mysqlcheck: medium-check option
  561. .\" medium-check option: mysqlcheck
  562. \fB\-\-medium\-check\fR,
  563. \fB\-m\fR
  564. .sp
  565. Do a check that is faster than an
  566. \fB\-\-extended\fR
  567. operation\&. This finds only 99\&.99% of all errors, which should be good enough in most cases\&.
  568. .RE
  569. .sp
  570. .RS 4
  571. .ie n \{\
  572. \h'-04'\(bu\h'+03'\c
  573. .\}
  574. .el \{\
  575. .sp -1
  576. .IP \(bu 2.3
  577. .\}
  578. .\" mysqlcheck: optimize option
  579. .\" optimize option: mysqlcheck
  580. \fB\-\-optimize\fR,
  581. \fB\-o\fR
  582. .sp
  583. Optimize the tables\&.
  584. .RE
  585. .sp
  586. .RS 4
  587. .ie n \{\
  588. \h'-04'\(bu\h'+03'\c
  589. .\}
  590. .el \{\
  591. .sp -1
  592. .IP \(bu 2.3
  593. .\}
  594. .\" mysqlcheck: password option
  595. .\" password option: mysqlcheck
  596. \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR,
  597. \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR
  598. .sp
  599. The password to use when connecting to the server\&. If you use the short option form (\fB\-p\fR), you
  600. \fIcannot\fR
  601. have a space between the option and the password\&. If you omit the
  602. \fIpassword\fR
  603. value following the
  604. \fB\-\-password\fR
  605. or
  606. \fB\-p\fR
  607. option on the command line,
  608. \fBmysqlcheck\fR
  609. prompts for one\&.
  610. .sp
  611. Specifying a password on the command line should be considered insecure\&. See
  612. 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\&.
  613. .RE
  614. .sp
  615. .RS 4
  616. .ie n \{\
  617. \h'-04'\(bu\h'+03'\c
  618. .\}
  619. .el \{\
  620. .sp -1
  621. .IP \(bu 2.3
  622. .\}
  623. .\" mysqlcheck: pipe option
  624. .\" pipe option: mysql
  625. \fB\-\-pipe\fR,
  626. \fB\-W\fR
  627. .sp
  628. On Windows, connect to the server via a named pipe\&. This option applies only if the server supports named\-pipe connections\&.
  629. .RE
  630. .sp
  631. .RS 4
  632. .ie n \{\
  633. \h'-04'\(bu\h'+03'\c
  634. .\}
  635. .el \{\
  636. .sp -1
  637. .IP \(bu 2.3
  638. .\}
  639. .\" mysqlcheck: port option
  640. .\" port option: mysqlcheck
  641. \fB\-\-port=\fR\fB\fIport_num\fR\fR,
  642. \fB\-P \fR\fB\fIport_num\fR\fR
  643. .sp
  644. The TCP/IP port number to use for the connection\&.
  645. .RE
  646. .sp
  647. .RS 4
  648. .ie n \{\
  649. \h'-04'\(bu\h'+03'\c
  650. .\}
  651. .el \{\
  652. .sp -1
  653. .IP \(bu 2.3
  654. .\}
  655. .\" mysqlcheck: protocol option
  656. .\" protocol option: mysqlcheck
  657. \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR
  658. .sp
  659. 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
  660. Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&.
  661. .RE
  662. .sp
  663. .RS 4
  664. .ie n \{\
  665. \h'-04'\(bu\h'+03'\c
  666. .\}
  667. .el \{\
  668. .sp -1
  669. .IP \(bu 2.3
  670. .\}
  671. .\" mysqlcheck: quick option
  672. .\" quick option: mysqlcheck
  673. \fB\-\-quick\fR,
  674. \fB\-q\fR
  675. .sp
  676. If you are using this option to check tables, it prevents the check from scanning the rows to check for incorrect links\&. This is the fastest check method\&.
  677. .sp
  678. If you are using this option to repair tables, it tries to repair only the index tree\&. This is the fastest repair method\&.
  679. .RE
  680. .sp
  681. .RS 4
  682. .ie n \{\
  683. \h'-04'\(bu\h'+03'\c
  684. .\}
  685. .el \{\
  686. .sp -1
  687. .IP \(bu 2.3
  688. .\}
  689. .\" mysqlcheck: repair option
  690. .\" repair option: mysqlcheck
  691. \fB\-\-repair\fR,
  692. \fB\-r\fR
  693. .sp
  694. Perform a repair that can fix almost anything except unique keys that are not unique\&.
  695. .RE
  696. .sp
  697. .RS 4
  698. .ie n \{\
  699. \h'-04'\(bu\h'+03'\c
  700. .\}
  701. .el \{\
  702. .sp -1
  703. .IP \(bu 2.3
  704. .\}
  705. .\" mysqlcheck: silent option
  706. .\" silent option: mysqlcheck
  707. \fB\-\-silent\fR,
  708. \fB\-s\fR
  709. .sp
  710. Silent mode\&. Print only error messages\&.
  711. .RE
  712. .sp
  713. .RS 4
  714. .ie n \{\
  715. \h'-04'\(bu\h'+03'\c
  716. .\}
  717. .el \{\
  718. .sp -1
  719. .IP \(bu 2.3
  720. .\}
  721. .\" mysqlcheck: socket option
  722. .\" socket option: mysqlcheck
  723. \fB\-\-socket=\fR\fB\fIpath\fR\fR,
  724. \fB\-S \fR\fB\fIpath\fR\fR
  725. .sp
  726. For connections to
  727. localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use\&.
  728. .RE
  729. .sp
  730. .RS 4
  731. .ie n \{\
  732. \h'-04'\(bu\h'+03'\c
  733. .\}
  734. .el \{\
  735. .sp -1
  736. .IP \(bu 2.3
  737. .\}
  738. .\" mysqlcheck: SSL options
  739. .\" SSL options: mysqlcheck
  740. \fB\-\-ssl*\fR
  741. .sp
  742. Options that begin with
  743. \fB\-\-ssl\fR
  744. specify whether to connect to the server via SSL and indicate where to find SSL keys and certificates\&. See
  745. Section\ \&5.5.6.3, \(lqSSL Command Options\(rq\&.
  746. .RE
  747. .sp
  748. .RS 4
  749. .ie n \{\
  750. \h'-04'\(bu\h'+03'\c
  751. .\}
  752. .el \{\
  753. .sp -1
  754. .IP \(bu 2.3
  755. .\}
  756. .\" mysqlcheck: tables option
  757. .\" tables option: mysqlcheck
  758. \fB\-\-tables\fR
  759. .sp
  760. Override the
  761. \fB\-\-databases\fR
  762. or
  763. \fB\-B\fR
  764. option\&. All name arguments following the option are regarded as table names\&.
  765. .RE
  766. .sp
  767. .RS 4
  768. .ie n \{\
  769. \h'-04'\(bu\h'+03'\c
  770. .\}
  771. .el \{\
  772. .sp -1
  773. .IP \(bu 2.3
  774. .\}
  775. .\" mysqlcheck: use-frm option
  776. .\" use-frm option: mysqlcheck
  777. \fB\-\-use\-frm\fR
  778. .sp
  779. For repair operations on
  780. MyISAM
  781. tables, get the table structure from the
  782. \&.frm
  783. file so that the table can be repaired even if the
  784. \&.MYI
  785. header is corrupted\&.
  786. .RE
  787. .sp
  788. .RS 4
  789. .ie n \{\
  790. \h'-04'\(bu\h'+03'\c
  791. .\}
  792. .el \{\
  793. .sp -1
  794. .IP \(bu 2.3
  795. .\}
  796. .\" mysqlcheck: user option
  797. .\" user option: mysqlcheck
  798. \fB\-\-user=\fR\fB\fIuser_name\fR\fR,
  799. \fB\-u \fR\fB\fIuser_name\fR\fR
  800. .sp
  801. The MySQL user name to use when connecting to the server\&.
  802. .RE
  803. .sp
  804. .RS 4
  805. .ie n \{\
  806. \h'-04'\(bu\h'+03'\c
  807. .\}
  808. .el \{\
  809. .sp -1
  810. .IP \(bu 2.3
  811. .\}
  812. .\" mysqlcheck: verbose option
  813. .\" verbose option: mysqlcheck
  814. \fB\-\-verbose\fR,
  815. \fB\-v\fR
  816. .sp
  817. Verbose mode\&. Print information about the various stages of program operation\&.
  818. .RE
  819. .sp
  820. .RS 4
  821. .ie n \{\
  822. \h'-04'\(bu\h'+03'\c
  823. .\}
  824. .el \{\
  825. .sp -1
  826. .IP \(bu 2.3
  827. .\}
  828. .\" mysqlcheck: version option
  829. .\" version option: mysqlcheck
  830. \fB\-\-version\fR,
  831. \fB\-V\fR
  832. .sp
  833. Display version information and exit\&.
  834. .RE
  835. .sp
  836. .RS 4
  837. .ie n \{\
  838. \h'-04'\(bu\h'+03'\c
  839. .\}
  840. .el \{\
  841. .sp -1
  842. .IP \(bu 2.3
  843. .\}
  844. .\" mysqlcheck: write-binlog option
  845. .\" write-binlog option: mysqlcheck
  846. \fB\-\-write\-binlog\fR
  847. .sp
  848. This option is enabled by default, so that
  849. ANALYZE TABLE,
  850. OPTIMIZE TABLE, and
  851. REPAIR TABLE
  852. statements generated by
  853. \fBmysqlcheck\fR
  854. are written to the binary log\&. Use
  855. \fB\-\-skip\-write\-binlog\fR
  856. to cause
  857. NO_WRITE_TO_BINLOG
  858. to be added to the statements so that they are not logged\&. Use the
  859. \fB\-\-skip\-write\-binlog\fR
  860. when these statements should not be sent to replication slaves or run when using the binary logs for recovery from backup\&. This option was added in MySQL 5\&.1\&.18\&.
  861. .RE
  862. .SH "COPYRIGHT"
  863. .br
  864. .PP
  865. Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
  866. .PP
  867. 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.
  868. .PP
  869. 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.
  870. .PP
  871. 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/.
  872. .sp
  873. .SH "SEE ALSO"
  874. For more information, please refer to the MySQL Reference Manual,
  875. which may already be installed locally and which is also available
  876. online at http://dev.mysql.com/doc/.
  877. .SH AUTHOR
  878. Sun Microsystems, Inc. (http://www.mysql.com/).