<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="myisamchk-general-options">
      </a>
      6.6.4.1 myisamchk General Options
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045307534656">
  </a>
  <a class="indexterm" name="idm46045307533168">
  </a>
  <p>
   The options described in this section can be used for any type
        of table maintenance operation performed by
   <a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
    <span class="command">
     <strong>
      myisamchk
     </strong>
    </span>
   </a>
   . The sections following this one
        describe options that pertain only to specific operations, such
        as table checking or repairing.
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a name="option_myisamchk_help">
      </a>
      <a class="link" href="myisamchk-general-options.html#option_myisamchk_help">
       <code class="option">
        --help
       </code>
      </a>
      ,
      <code class="option">
       -?
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for help">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --help
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045307521664">
     </a>
     <a class="indexterm" name="idm46045307520176">
     </a>
     <p>
      Display a help message and exit. Options are grouped by type
            of operation.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_myisamchk_HELP">
      </a>
      <a class="link" href="myisamchk-general-options.html#option_myisamchk_HELP">
       <code class="option">
        --HELP
       </code>
      </a>
      ,
      <code class="option">
       -H
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for HELP">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --HELP
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045307510128">
     </a>
     <a class="indexterm" name="idm46045307508640">
     </a>
     <p>
      Display a help message and exit. Options are presented in a
            single list.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_myisamchk_debug">
      </a>
      <a class="link" href="myisamchk-general-options.html#option_myisamchk_debug">
       <code class="option">
        --debug=
        <em class="replaceable">
         <code>
          debug_options
         </code>
        </em>
       </code>
      </a>
      ,
      <code class="option">
       -#
       <em class="replaceable">
        <code>
         debug_options
        </code>
       </em>
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for debug">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --debug[=debug_options]
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          String
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           d:t:o,/tmp/myisamchk.trace
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045307493568">
     </a>
     <a class="indexterm" name="idm46045307492080">
     </a>
     <p>
      Write a debugging log. A typical
      <em class="replaceable">
       <code>
        debug_options
       </code>
      </em>
      string is
      <code class="literal">
       d:t:o,
       <em class="replaceable">
        <code>
         file_name
        </code>
       </em>
      </code>
      .
            The default is
      <code class="literal">
       d:t:o,/tmp/myisamchk.trace
      </code>
      .
     </p>
     <p>
      This option is available only if MySQL was built using
      <a class="link" href="source-configuration-options.html#option_cmake_with_debug">
       <code class="option">
        WITH_DEBUG
       </code>
      </a>
      . MySQL release
            binaries provided by Oracle are
      <span class="emphasis">
       <em>
        not
       </em>
      </span>
      built using this option.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_myisamchk_defaults-extra-file">
      </a>
      <a class="link" href="myisamchk-general-options.html#option_myisamchk_defaults-extra-file">
       <code class="option">
        --defaults-extra-file=
        <em class="replaceable">
         <code>
          file_name
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for defaults-extra-file">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --defaults-extra-file=file_name
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          File name
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045307475904">
     </a>
     <a class="indexterm" name="idm46045307474400">
     </a>
     <p>
      Read this option file after the global option file but (on
            Unix) before the user option file. If the file does not
            exist or is otherwise inaccessible, an error occurs. If
      <em class="replaceable">
       <code>
        file_name
       </code>
      </em>
      is not an absolute path
            name, it is interpreted relative to the current directory.
     </p>
     <p>
      For additional information about this and other option-file
            options, see
      <a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
       Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_myisamchk_defaults-file">
      </a>
      <a class="link" href="myisamchk-general-options.html#option_myisamchk_defaults-file">
       <code class="option">
        --defaults-file=
        <em class="replaceable">
         <code>
          file_name
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for defaults-file">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --defaults-file=file_name
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          File name
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045307460560">
     </a>
     <a class="indexterm" name="idm46045307459072">
     </a>
     <p>
      Use only the given option file. If the file does not exist
            or is otherwise inaccessible, an error occurs. If
      <em class="replaceable">
       <code>
        file_name
       </code>
      </em>
      is not an absolute path
            name, it is interpreted relative to the current directory.
     </p>
     <p>
      For additional information about this and other option-file
            options, see
      <a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
       Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_myisamchk_defaults-group-suffix">
      </a>
      <a class="link" href="myisamchk-general-options.html#option_myisamchk_defaults-group-suffix">
       <code class="option">
        --defaults-group-suffix=
        <em class="replaceable">
         <code>
          str
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for defaults-group-suffix">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --defaults-group-suffix=str
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          String
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045307445280">
     </a>
     <a class="indexterm" name="idm46045307443776">
     </a>
     <p>
      Read not only the usual option groups, but also groups with
            the usual names and a suffix of
      <em class="replaceable">
       <code>
        str
       </code>
      </em>
      . For example,
      <a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
       <span class="command">
        <strong>
         myisamchk
        </strong>
       </span>
      </a>
      normally reads the
      <code class="literal">
       [myisamchk]
      </code>
      group. If this option is
            given as
      <a class="link" href="myisamchk-general-options.html#option_myisamchk_defaults-group-suffix">
       <code class="option">
        --defaults-group-suffix=_other
       </code>
      </a>
      ,
      <a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
       <span class="command">
        <strong>
         myisamchk
        </strong>
       </span>
      </a>
      also reads the
      <code class="literal">
       [myisamchk_other]
      </code>
      group.
     </p>
     <p>
      For additional information about this and other option-file
            options, see
      <a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
       Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_myisamchk_no-defaults">
      </a>
      <a class="link" href="myisamchk-general-options.html#option_myisamchk_no-defaults">
       <code class="option">
        --no-defaults
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for no-defaults">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --no-defaults
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045307427440">
     </a>
     <a class="indexterm" name="idm46045307425952">
     </a>
     <p>
      Do not read any option files. If program startup fails due
            to reading unknown options from an option file,
      <a class="link" href="myisamchk-general-options.html#option_myisamchk_no-defaults">
       <code class="option">
        --no-defaults
       </code>
      </a>
      can be used
            to prevent them from being read.
     </p>
     <p>
      The exception is that the
      <code class="filename">
       .mylogin.cnf
      </code>
      file is read in all cases, if it exists. This permits
            passwords to be specified in a safer way than on the command
            line even when
      <a class="link" href="myisamchk-general-options.html#option_myisamchk_no-defaults">
       <code class="option">
        --no-defaults
       </code>
      </a>
      is used. To
            create
      <code class="filename">
       .mylogin.cnf
      </code>
      , use the
      <a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
       <span class="command">
        <strong>
         mysql_config_editor
        </strong>
       </span>
      </a>
      utility. See
      <a class="xref" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
       Section 6.6.7, “mysql_config_editor — MySQL Configuration Utility”
      </a>
      .
     </p>
     <p>
      For additional information about this and other option-file
            options, see
      <a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
       Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_myisamchk_print-defaults">
      </a>
      <a class="link" href="myisamchk-general-options.html#option_myisamchk_print-defaults">
       <code class="option">
        --print-defaults
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for print-defaults">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --print-defaults
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045307409104">
     </a>
     <a class="indexterm" name="idm46045307407616">
     </a>
     <p>
      Print the program name and all options that it gets from
            option files.
     </p>
     <p>
      For additional information about this and other option-file
            options, see
      <a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
       Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_myisamchk_silent">
      </a>
      <a class="link" href="myisamchk-general-options.html#option_myisamchk_silent">
       <code class="option">
        --silent
       </code>
      </a>
      ,
      <code class="option">
       -s
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for silent">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --silent
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045307396464">
     </a>
     <a class="indexterm" name="idm46045307394976">
     </a>
     <p>
      Silent mode. Write output only when errors occur. You can
            use
      <code class="option">
       -s
      </code>
      twice (
      <code class="option">
       -ss
      </code>
      ) to make
      <a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
       <span class="command">
        <strong>
         myisamchk
        </strong>
       </span>
      </a>
      very silent.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_myisamchk_verbose">
      </a>
      <a class="link" href="myisamchk-general-options.html#option_myisamchk_verbose">
       <code class="option">
        --verbose
       </code>
      </a>
      ,
      <code class="option">
       -v
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for verbose">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --verbose
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045307382720">
     </a>
     <a class="indexterm" name="idm46045307381232">
     </a>
     <p>
      Verbose mode. Print more information about what the program
            does. This can be used with
      <code class="option">
       -d
      </code>
      and
      <code class="option">
       -e
      </code>
      . Use
      <code class="option">
       -v
      </code>
      multiple times
            (
      <code class="option">
       -vv
      </code>
      ,
      <code class="option">
       -vvv
      </code>
      ) for even more
            output.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_myisamchk_version">
      </a>
      <a class="link" href="myisamchk-general-options.html#option_myisamchk_version">
       <code class="option">
        --version
       </code>
      </a>
      ,
      <code class="option">
       -V
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for version">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --version
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045307368992">
     </a>
     <a class="indexterm" name="idm46045307367504">
     </a>
     <p>
      Display version information and exit.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_myisamchk_wait">
      </a>
      <a class="link" href="myisamchk-general-options.html#option_myisamchk_wait">
       <code class="option">
        --wait
       </code>
      </a>
      ,
      <code class="option">
       -w
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for wait">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --wait
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Boolean
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           false
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045307353056">
     </a>
     <a class="indexterm" name="idm46045307351568">
     </a>
     <p>
      Instead of terminating with an error if the table is locked,
            wait until the table is unlocked before continuing. If you
            are running
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      with external locking
            disabled, the table can be locked only by another
      <a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
       <span class="command">
        <strong>
         myisamchk
        </strong>
       </span>
      </a>
      command.
     </p>
    </li>
   </ul>
  </div>
  <p>
   You can also set the following variables by using
   <code class="option">
    --
    <em class="replaceable">
     <code>
      var_name
     </code>
    </em>
    =
    <em class="replaceable">
     <code>
      value
     </code>
    </em>
   </code>
   syntax:
  </p>
  <a class="indexterm" name="idm46045307345120">
  </a>
  <a class="indexterm" name="idm46045307344032">
  </a>
  <a class="indexterm" name="idm46045307342944">
  </a>
  <a class="indexterm" name="idm46045307341856">
  </a>
  <a class="indexterm" name="idm46045307340768">
  </a>
  <a class="indexterm" name="idm46045307339680">
  </a>
  <a class="indexterm" name="idm46045307338592">
  </a>
  <a class="indexterm" name="idm46045307337504">
  </a>
  <a class="indexterm" name="idm46045307336416">
  </a>
  <a class="indexterm" name="idm46045307335312">
  </a>
  <a class="indexterm" name="idm46045307334224">
  </a>
  <a class="indexterm" name="idm46045307333136">
  </a>
  <div class="informaltable">
   <table summary="myisamchk variables that can be set using --var_name=value syntax. The table also provides the default value for each variable.">
    <colgroup>
     <col style="width: 35%"/>
     <col style="width: 35%"/>
    </colgroup>
    <thead>
     <tr>
      <th>
       Variable
      </th>
      <th>
       Default Value
      </th>
     </tr>
    </thead>
    <tbody>
     <tr>
      <td>
       <code class="literal">
        decode_bits
       </code>
      </td>
      <td>
       9
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        ft_max_word_len
       </code>
      </td>
      <td>
       version-dependent
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        ft_min_word_len
       </code>
      </td>
      <td>
       4
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        ft_stopword_file
       </code>
      </td>
      <td>
       built-in list
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        key_buffer_size
       </code>
      </td>
      <td>
       523264
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        myisam_block_size
       </code>
      </td>
      <td>
       1024
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        myisam_sort_key_blocks
       </code>
      </td>
      <td>
       16
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        read_buffer_size
       </code>
      </td>
      <td>
       262136
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        sort_buffer_size
       </code>
      </td>
      <td>
       2097144
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        sort_key_blocks
       </code>
      </td>
      <td>
       16
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        stats_method
       </code>
      </td>
      <td>
       nulls_unequal
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        write_buffer_size
       </code>
      </td>
      <td>
       262136
      </td>
     </tr>
    </tbody>
   </table>
  </div>
  <div class="informaltable">
   <table cellpadding="0" cellspacing="0" style="position: fixed; top: 0px; display: none; left: 401px; width: 532px;">
    <thead>
     <tr>
      <th style="width: 265.375px;">
       Variable
      </th>
      <th style="width: 265.375px;">
       Default Value
      </th>
     </tr>
    </thead>
   </table>
  </div>
  <p>
   The possible
   <a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
    <span class="command">
     <strong>
      myisamchk
     </strong>
    </span>
   </a>
   variables and their
        default values can be examined with
   <a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
    <span class="command">
     <strong>
      myisamchk
        --help
     </strong>
    </span>
   </a>
   :
  </p>
  <p>
   <code class="literal">
    myisam_sort_buffer_size
   </code>
   is used when the keys
        are repaired by sorting keys, which is the normal case when you
        use
   <a class="link" href="myisamchk-repair-options.html#option_myisamchk_recover">
    <code class="option">
     --recover
    </code>
   </a>
   .
   <code class="literal">
    sort_buffer_size
   </code>
   is a deprecated synonym for
   <code class="literal">
    myisam_sort_buffer_size
   </code>
   .
  </p>
  <p>
   <code class="literal">
    key_buffer_size
   </code>
   is used when you are checking
        the table with
   <a class="link" href="myisamchk-check-options.html#option_myisamchk_extend-check">
    <code class="option">
     --extend-check
    </code>
   </a>
   or when the keys are repaired by inserting keys row by row into
        the table (like when doing normal inserts). Repairing through
        the key buffer is used in the following cases:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      You use
      <a class="link" href="myisamchk-repair-options.html#option_myisamchk_safe-recover">
       <code class="option">
        --safe-recover
       </code>
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      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 large key values for
      <a class="link" href="char.html" title="13.3.2 The CHAR and VARCHAR Types">
       <code class="literal">
        CHAR
       </code>
      </a>
      ,
      <a class="link" href="char.html" title="13.3.2 The CHAR and VARCHAR Types">
       <code class="literal">
        VARCHAR
       </code>
      </a>
      , or
      <a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
       <code class="literal">
        TEXT
       </code>
      </a>
      columns, because the
            sort operation needs to store the complete key values as it
            proceeds. If you have lots of temporary space and you can
            force
      <a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
       <span class="command">
        <strong>
         myisamchk
        </strong>
       </span>
      </a>
      to repair by sorting, you
            can use the
      <a class="link" href="myisamchk-repair-options.html#option_myisamchk_sort-recover">
       <code class="option">
        --sort-recover
       </code>
      </a>
      option.
     </p>
    </li>
   </ul>
  </div>
  <p>
   Repairing through the key buffer takes much less disk space than
        using sorting, but is also much slower.
  </p>
  <p>
   If you want a faster repair, set the
   <code class="literal">
    key_buffer_size
   </code>
   and
   <code class="literal">
    myisam_sort_buffer_size
   </code>
   variables to about
        25% of your available memory. You can set both variables to
        large values, because only one of them is used at a time.
  </p>
  <p>
   <code class="literal">
    myisam_block_size
   </code>
   is the size used for index
        blocks.
  </p>
  <p>
   <code class="literal">
    stats_method
   </code>
   influences how
   <code class="literal">
    NULL
   </code>
   values are treated for index statistics
        collection when the
   <a class="link" href="myisamchk-other-options.html#option_myisamchk_analyze">
    <code class="option">
     --analyze
    </code>
   </a>
   option is given. It acts like the
   <code class="literal">
    myisam_stats_method
   </code>
   system variable. For more
        information, see the description of
   <code class="literal">
    myisam_stats_method
   </code>
   in
   <a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
    Section 7.1.8, “Server System Variables”
   </a>
   , and
   <a class="xref" href="index-statistics.html" title="10.3.8 InnoDB and MyISAM Index Statistics Collection">
    Section 10.3.8, “InnoDB and MyISAM Index Statistics Collection”
   </a>
   .
  </p>
  <p>
   <code class="literal">
    ft_min_word_len
   </code>
   and
   <code class="literal">
    ft_max_word_len
   </code>
   indicate the minimum and
        maximum word length for
   <code class="literal">
    FULLTEXT
   </code>
   indexes on
   <code class="literal">
    MyISAM
   </code>
   tables.
   <code class="literal">
    ft_stopword_file
   </code>
   names the stopword file.
        These need to be set under the following circumstances.
  </p>
  <p>
   If you use
   <a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
    <span class="command">
     <strong>
      myisamchk
     </strong>
    </span>
   </a>
   to perform an operation
        that modifies table indexes (such as repair or analyze), the
   <code class="literal">
    FULLTEXT
   </code>
   indexes are rebuilt using the
        default full-text parameter values for minimum and maximum word
        length and the stopword file unless you specify otherwise. This
        can result in queries failing.
  </p>
  <p>
   The problem occurs because these parameters are known only by
        the server. They are not stored in
   <code class="literal">
    MyISAM
   </code>
   index files. To avoid the problem if you have modified the
        minimum or maximum word length or the stopword file in the
        server, specify the same
   <code class="literal">
    ft_min_word_len
   </code>
   ,
   <code class="literal">
    ft_max_word_len
   </code>
   , and
   <code class="literal">
    ft_stopword_file
   </code>
   values to
   <a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
    <span class="command">
     <strong>
      myisamchk
     </strong>
    </span>
   </a>
   that you use for
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   . For example, if you have set the
        minimum word length to 3, you can repair a table with
   <a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
    <span class="command">
     <strong>
      myisamchk
     </strong>
    </span>
   </a>
   like this:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa12542802"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">myisamchk <span class="token property">--recover</span> <span class="token constant">--ft_min_word_len</span><span class="token attr-value"><span class="token punctuation">=</span>3</span> <em class="replaceable">tbl_name</em><span class="token punctuation">.</span>MYI</code></pre>
  </div>
  <p>
   To ensure that
   <a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
    <span class="command">
     <strong>
      myisamchk
     </strong>
    </span>
   </a>
   and the server use
        the same values for full-text parameters, you can place each one
        in both the
   <code class="literal">
    [mysqld]
   </code>
   and
   <code class="literal">
    [myisamchk]
   </code>
   sections of an option file:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-ini"><div class="docs-select-all right" id="sa49066124"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-ini"><span class="token selector">[mysqld]</span>
<span class="token constant">ft_min_word_len</span><span class="token attr-value"><span class="token punctuation">=</span>3</span>

<span class="token selector">[myisamchk]</span>
<span class="token constant">ft_min_word_len</span><span class="token attr-value"><span class="token punctuation">=</span>3</span></code></pre>
  </div>
  <p>
   An alternative to using
   <a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
    <span class="command">
     <strong>
      myisamchk
     </strong>
    </span>
   </a>
   is to use
        the
   <a class="link" href="repair-table.html" title="15.7.3.5 REPAIR TABLE Statement">
    <code class="literal">
     REPAIR TABLE
    </code>
   </a>
   ,
   <a class="link" href="analyze-table.html" title="15.7.3.1 ANALYZE TABLE Statement">
    <code class="literal">
     ANALYZE TABLE
    </code>
   </a>
   ,
   <a class="link" href="optimize-table.html" title="15.7.3.4 OPTIMIZE TABLE Statement">
    <code class="literal">
     OPTIMIZE TABLE
    </code>
   </a>
   , or
   <a class="link" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
    <code class="literal">
     ALTER TABLE
    </code>
   </a>
   . These statements are
        performed by the server, which knows the proper full-text
        parameter values to use.
  </p>
 </div>
 <br/>
</div>
