GNU Info

Info Node: (mysql.info)myisamchk repair options

(mysql.info)myisamchk repair options


Next: myisamchk other options Prev: myisamchk check options Up: Table maintenance
Enter node , (file) or (file)node

Repair Options for myisamchk
............................

The following options are used if you start `myisamchk' with `-r' or
`-o':

`-D # or --data-file-length=#'
     Max length of data file (when re-creating data file when it's
     'full').

`-e or --extend-check'
     Try to recover every possible row from the data file.  Normally
     this will also find a lot of garbage rows. Don't use this option
     if you are not totally desperate.

`-f or --force'
     Overwrite old temporary files (`table_name.TMD') instead of
     aborting.

`-k # or keys-used=#'
     If you are using ISAM, tells the ISAM table handler to update only
     the first `#' indexes.  If you are using `MyISAM', tells which keys
     to use, where each binary bit stands for one key (first key is bit
     0).  This can be used to get faster inserts!  Deactivated indexes
     can be reactivated by using `myisamchk -r'.  keys.

`-l or --no-symlinks'
     Do not follow symbolic links. Normally `myisamchk' repairs the
     table a symlink points at.  This option doesn't exist in MySQL 4.0,
     as MySQL 4.0 will not remove symlinks during repair.

`-r or --recover'
     Can fix almost anything except unique keys that aren't unique
     (which is an extremely unlikely error with ISAM/MyISAM tables).
     If you want to recover a table, this is the option to try first.
     Only if myisamchk reports that the table can't be recovered by
     `-r', you should then try `-o'.  (Note that in the unlikely case
     that `-r' fails, the data file is still intact.)  If you have lots
     of memory, you should increase the size of `sort_buffer_size'!

`-o or --safe-recover'
     Uses an old recovery method (reads through all rows in order and
     updates all index trees based on the found rows); this is a
     magnitude slower than `-r', but can handle a couple of very
     unlikely cases that `-r' cannot handle.  This recovery method also
     uses much less disk space than `-r'. Normally one should always
     first repair with `-r', and only if this fails use `-o'.

     If you have lots of memory, you should increase the size of
     `key_buffer_size'!

`-n or --sort-recover'
     Force `myisamchk' to use sorting to resolve the keys even if the
     temporary files should be very big.  This will not have any effect
     if you have fulltext keys in the table.

`--character-sets-dir=...'
     Directory where character sets are stored.

`--set-character-set=name'
     Change the character set used by the index

`.t or --tmpdir=path'
     Path for storing temporary files. If this is not set, `myisamchk'
     will use the environment variable `TMPDIR' for this.

`-q or --quick'
     Faster repair by not modifying the data file. One can give a second
     `-q' to force `myisamchk' to modify the original datafile in case
     of duplicate keys

`-u or --unpack'
     Unpack file packed with myisampack.


automatically generated by info2www version 1.2.2.9