Search the MySQL manual:

4.4.6.2 General Options for myisamchk

myisamchk supports the following options.

-# or --debug=debug_options
Output debug log. The debug_options string often is 'd:t:o,filename'.
-? or --help
Display a help message and exit.
-O var=option, --set-variable var=option
Set the value of a variable. Please note that --set-variable is deprecated since MySQL 4.0, just use --var=option on its own. The possible variables and their default values for myisamchk can be examined with myisamchk --help:
Variable Value
key_buffer_size 523264
read_buffer_size 262136
write_buffer_size 262136
sort_buffer_size 2097144
sort_key_blocks 16
decode_bits 9
sort_buffer_size is used when the keys are repaired by sorting keys, which is the normal case when you use --recover. key_buffer_size is used when you are checking the table with --extended-check or when the keys are repaired by inserting key row by row in to the table (like when doing normal inserts). Repairing through the key buffer is used in the following cases:
  • If you use --safe-recover.
  • If the temporary files needed to sort the keys would be more than twice as big as when creating the key file directly. This is often the case when you have big CHAR, VARCHAR or TEXT keys as the sort needs to store the whole keys during sorting. If you have lots of temporary space and you can force myisamchk to repair by sorting you can use the --sort-recover option.
Reparing through the key buffer takes much less disk space than using sorting, but is also much slower. If you want a faster repair, set the above variables to about 1/4 of your available memory. You can set both variables to big values, as only one of the above buffers will be used at a time.
-s or --silent
Silent mode. Write output only when errors occur. You can use -s twice (-ss) to make myisamchk very silent.
-v or --verbose
Verbose mode. Print more information. This can be used with -d and -e. Use -v multiple times (-vv, -vvv) for more verbosity!
-V or --version
Print the myisamchk version and exit.
-w or, --wait
Instead of giving an error if the table is locked, wait until the table is unlocked before continuing. Note that if you are running mysqld on the table with --skip-external-locking, the table can only be locked by another myisamchk command.

User Comments

Posted by You are going to die like the all the other human beings on Tuesday August 5 2003, @2:23am[Delete] [Edit]

Good to see descriptions of each variable.

Posted by You are going to die like the all the other human beings on Tuesday August 5 2003, @2:32am[Delete] [Edit]

sort_key_blocks?
write_buffer_size?
decode_bits?

Are we supposed to guess?

Add your own comment.