Oracle 5.0 Reference Manual page 338

Table of Contents

Advertisement

myisamchk
shell>
myisamchk [options] tbl_name ...
The
specify what you want
options
You can also get a list of options by invoking
With no options,
myisamchk
information or to tell
myisamchk
discussion.
is the database table you want to check or repair. If you run
tbl_name
other than in the database directory, you must specify the path to the database directory, because
has no idea where the database is located. In fact,
myisamchk
whether the files you are working on are located in a database directory. You can copy the files that
correspond to a database table into some other location and perform recovery operations on them
there.
You can name several tables on the
table by naming its index file (the file with the
directory by using the pattern *.MYI. For example, if you are in a database directory, you can check all
the
tables in that directory like this:
MyISAM
shell>
myisamchk *.MYI
If you are not in the database directory, you can check all the tables there by specifying the path to the
directory:
shell>
myisamchk /path/to/database_dir/*.MYI
You can even check all tables in all databases by specifying a wildcard with the path to the MySQL
data directory:
shell>
myisamchk /path/to/datadir/*/*.MYI
The recommended way to quickly check all
shell>
myisamchk --silent --fast /path/to/datadir/*/*.MYI
If you want to check all
command:
shell>
myisamchk --silent --force --fast --update-state \
--key_buffer_size=64M --sort_buffer_size=64M \
--read_buffer_size=1M --write_buffer_size=1M \
/path/to/datadir/*/*.MYI
This command assumes that you have more than 64MB free. For more information about memory
allocation with myisamchk, see
For additional information about using myisamchk, see
Crash
Recovery".
Important
You must ensure that no other program is using the tables while you are
running myisamchk. The most effective means of doing so is to shut down the
MySQL server while running myisamchk, or to lock all tables that
is being used on.
Otherwise, when you run myisamchk, it may display the following error
message:
warning: clients are using or haven't closed the table properly
This means that you are trying to check a table that has been updated by
another program (such as the
— MyISAM Table-Maintenance Utility
myisamchk
myisamchk
simply checks your table as the default operation. To get more
to take corrective action, specify options as described in the following
myisamchk
.MYI
MyISAM
tables and repair any that are corrupted, you can use the following
MyISAM
Section 4.6.3.6,
318
to do. They are described in the following sections.
--help.
myisamchk
command line if you wish. You can also specify a
suffix). This enables you to specify all tables in a
tables is:
"myisamchk
Memory
Section 7.6,
"MyISAM
server) that hasn't yet closed the file or
mysqld
somewhere
myisamchk
does not actually care
Usage".
Table Maintenance and
myisamchk

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents