.\" disable justification (adjust text to left margin only)
28
28
and
29
29
\fI.MYI\fR
30
30
files for storing data and indexes).
31
.sp
32
.it 1 an-trap
33
.nr an-no-space-flag 1
34
.nr an-break-flag 1
35
.br
36
\fBCaution\fR
37
.PP
38
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 filesystem errors.
the section called \(lq\fBMYISAMCHK\fR MEMORY USAGE\(rq.
121
133
.PP
122
You must ensure that no other program is using the tables while you are running
123
\fBmyisamchk\fR. Otherwise, when you run
134
\fBMySQL Enterprise\fR. For expert advice on checking and repairing tables, subscribe to the MySQL Network Monitoring and Advisory. For more information see
\fIYou must ensure that no other program is using the tables while you are running \fR\fI\fBmyisamchk\fR\fR. The most effective means of doing so is to shut down the MySQL server while running
144
\fBmyisamchk\fR, or to lock all tables that
145
\fBmyisamchk\fR
146
is being used on.
147
.PP
148
Otherwise, when you run
124
149
\fBmyisamchk\fR, it may display the following error message:
125
150
.sp
126
151
.RS 3n
131
156
.PP
132
157
This means that you are trying to check a table that has been updated by another program (such as the
133
158
\fBmysqld\fR
134
server) that hasn't yet closed the file or that has died without closing the file properly.
159
server) that hasn't yet closed the file or that has died without closing the file properly, which can sometimes lead to the corruption of one or more
160
MyISAM
161
tables.
135
162
.PP
136
163
If
137
164
\fBmysqld\fR
138
165
is running, you must force it to flush any table modifications that are still buffered in memory by using
139
166
FLUSH TABLES. You should then ensure that no one is using the tables while you are running
140
\fBmyisamchk\fR. The easiest way to avoid this problem is to use
167
\fBmyisamchk\fR
168
.PP
169
However, the easiest way to avoid this problem is to use
141
170
CHECK TABLE
142
171
instead of
143
172
\fBmyisamchk\fR
144
to check tables.
173
to check tables. See
174
Section\ 5.2.3, \(lqCHECK TABLE Syntax\(rq.
145
175
.SH "\fBMYISAMCHK\fR GENERAL OPTIONS"
146
176
.PP
147
177
The options described in this section can be used for any type of table maintenance operation performed by
syntax. However, this syntax is deprecated as of MySQL 4.0.
319
.PP
284
320
The possible
285
321
\fBmyisamchk\fR
286
322
variables and their default values can be examined with
339
375
was added in MySQL 5.0.14. For older versions, the statistics collection method is equivalent to
340
376
nulls_equal.
341
377
.PP
378
The
379
ft_min_word_len
380
and
381
ft_max_word_len
382
variables are available as of MySQL 4.0.0.
383
ft_stopword_file
384
is available as of MySQL 4.0.19.
385
.PP
342
386
ft_min_word_len
343
387
and
344
388
ft_max_word_len
501
545
\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
502
546
.sp
503
547
The directory where character sets are installed. See
504
Section\ 9.1, \(lqThe Character Set Used for Data and Sorting\(rq.
548
Section\ 8.1, \(lqThe Character Set Used for Data and Sorting\(rq.
505
549
.TP 3n
506
550
\(bu
507
551
\fB\-\-correct\-checksum\fR
536
580
\fBmyisamchk \-r\fR.
537
581
.TP 3n
538
582
\(bu
583
\fB\-\-no\-symlinks\fR,
584
\fB\-l\fR
585
.sp
586
Do not follow symbolic links. Normally
587
\fBmyisamchk\fR
588
repairs the table that a symlink points to. This option does not exist as of MySQL 4.0 because versions from 4.0 on do not remove symlinks during repair operations.
589
.TP 3n
590
\(bu
539
591
\fB\-\-max\-record\-length=\fR\fB\fIlen\fR\fR
540
592
.sp
541
593
Skip rows larger than the given length if
648
700
command or the
649
701
SHOW INDEX FROM \fItbl_name\fR
650
702
statement.
703
.PP
704
\fBMySQL Enterprise\fR. For expert advice on optimizing tables, subscribe to the MySQL Network Monitoring and Advisory. For more information see