~clint-fewbar/ubuntu/lucid/mysql-dfsg-5.1/increase-killtimeout

« back to all changes in this revision

Viewing changes to man/mysqlcheck.1

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug, Mathias Gug
  • Date: 2009-08-05 11:40:21 UTC
  • mfrom: (1.1.3 upstream) (0.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20090805114021-59bj0bgfm2ufllbk
Tags: 5.1.37-1ubuntu1
[ Mathias Gug ]
* Merge from debian unstable and 5.0, remaining changes:
  - debian/control:
    + Properly upgrade libmysqlclient16-dev packages to
    libmysqlclient-dev:
      * Make libmysqlclient16-dev a transitional package depending on
        libmysqlclient-dev.
      * Make libmysqlclient-dev replace libmysqlclient16-dev.
    + Don't provide a libmysqlclient15-dev package as long as there are
      packages still build-depending on libmysqlclient15-dev and
      mysql-dsfg-5.0 is in the archive.
    + Lower mailx from a Recommends to a Suggests to avoid pulling in
      a full MTA on all installs of mysql-server. (LP: #259477)
  - debian/rules:
    + added -fno-strict-aliasing to CFLAGS to get around mysql testsuite
      build failures.
  - debian/additions/debian-start.inc.sh: support ANSI mode (LP: #310211)
  - Add AppArmor profile:
    - debian/apparmor-profile: apparmor profile.
    - debian/rules, debian/mysql-server-5.1.files: install apparmor profile.
    - debian/mysql-server-5.1.dirs: add etc/apparmor.d/force-complain
    - debian/mysql-server-5.1.postrm: remove symlink in force-complain/ on
      purge.
    - debian/mysql-server-5.1.README.Debian: add apparmor documentation.
    - debian/additions/my.cnf: Add warning about apparmor. (LP: #201799)
    - debian/mysql-server-5.1.postinst: reload apparmor profiles.
  - debian/additions/my.cnf: remove language option. Error message files are
    located in a different directory in MySQL 5.0. Setting the language
    option to use /usr/share/mysql/english breaks 5.0. Both 5.0 and 5.1
    use a default value that works. (LP: #316974)
  - debian/mysql-server-5.1.mysql.init:
    + Clearly indicate that we do not support running multiple instances
      of mysqld by duplicating the init script.
      (closes: #314785, #324834, #435165, #444216)
    + Properly parameterize all existing references to the mysql config
      file (/etc/mysql/my.cnf).
  - debian/mysql-server-5.1.postinst: Clear out the second password
    when setting up mysql. (LP: #344816)
  - mysql-server-core-5.1 package for files needed by Akonadi:
    + debian/control: create mysql-server-core-5.1 package.
    + debian/mysql-server-core-5.1.files, debian/mysql-server-5.1.files:
      move core mysqld files to mysql-server-core-5.1 package.
* debian/libmysqlclient16.symbols.amd64: remove amd64 symbols as it has
  not been correctly generated in Debian.
* Add Apport hook: (LP: #354188)
  - debian/mysql-server-5.1.py: apport package hook.
  - debian/mysql-server-5.1.files, debian/rules: install apport package
    hook.
* debian/additions/my.cnf: 
  - drop old_password option.
  - fix commented logging options to use general_log and general_log_file.
* Dropped - accepted in Debian:
  - debian/mysql-server-5.1.config:
    + ask for MySQL root password at priority high instead of medium so
      that the password prompt is seen on a default install. (LP: #319843)
    + don't ask for root password when upgrading from a 5.0 install.

Show diffs side-by-side

added added

removed removed

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