<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="comp-err">
      </a>
      6.4.1 comp_err — Compile MySQL Error Message File
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045320862800">
  </a>
  <p>
   <a class="link" href="comp-err.html" title="6.4.1 comp_err — Compile MySQL Error Message File">
    <span class="command">
     <strong>
      comp_err
     </strong>
    </span>
   </a>
   creates the
   <code class="filename">
    errmsg.sys
   </code>
   file that is used by
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   to determine the error messages to
        display for different error codes.
   <a class="link" href="comp-err.html" title="6.4.1 comp_err — Compile MySQL Error Message File">
    <span class="command">
     <strong>
      comp_err
     </strong>
    </span>
   </a>
   normally is run automatically when MySQL is built. It compiles
        the
   <code class="filename">
    errmsg.sys
   </code>
   file from text-format error
        information in MySQL source distributions:
  </p>
  <p>
   The error information comes from the
   <code class="filename">
    messages_to_error_log.txt
   </code>
   and
   <code class="filename">
    messages_to_clients.txt
   </code>
   files in the
   <code class="filename">
    share
   </code>
   directory.
  </p>
  <p>
   For more information about defining error messages, see the
        comments within those files, along with the
   <code class="filename">
    errmsg_readme.txt
   </code>
   file.
  </p>
  <p>
   <a class="link" href="comp-err.html" title="6.4.1 comp_err — Compile MySQL Error Message File">
    <span class="command">
     <strong>
      comp_err
     </strong>
    </span>
   </a>
   also generates the
   <code class="filename">
    mysqld_error.h
   </code>
   ,
   <code class="filename">
    mysqld_ername.h
   </code>
   , and
   <code class="filename">
    mysqld_errmsg.h
   </code>
   header files.
  </p>
  <p>
   Invoke
   <a class="link" href="comp-err.html" title="6.4.1 comp_err — Compile MySQL Error Message File">
    <span class="command">
     <strong>
      comp_err
     </strong>
    </span>
   </a>
   like this:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa63995148"><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">comp_err <span class="token punctuation">[</span><em class="replaceable">options</em><span class="token punctuation">]</span></code></pre>
  </div>
  <p>
   <a class="link" href="comp-err.html" title="6.4.1 comp_err — Compile MySQL Error Message File">
    <span class="command">
     <strong>
      comp_err
     </strong>
    </span>
   </a>
   supports the following options.
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a name="option_comp_err_help">
      </a>
      <a class="link" href="comp-err.html#option_comp_err_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>
        <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="idm46045320830944">
     </a>
     <a class="indexterm" name="idm46045320829456">
     </a>
     <p>
      Display a help message and exit.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_comp_err_charset">
      </a>
      <a class="link" href="comp-err.html#option_comp_err_charset">
       <code class="option">
        --charset=
        <em class="replaceable">
         <code>
          dir_name
         </code>
        </em>
       </code>
      </a>
      ,
      <code class="option">
       -C
       <em class="replaceable">
        <code>
         dir_name
        </code>
       </em>
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for charset">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --charset
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          String
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           ../share/charsets
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045320814272">
     </a>
     <a class="indexterm" name="idm46045320812784">
     </a>
     <p>
      The character set directory. The default is
      <code class="filename">
       ../sql/share/charsets
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_comp_err_debug">
      </a>
      <a class="link" href="comp-err.html#option_comp_err_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=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/comp_err.trace
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045320796864">
     </a>
     <a class="indexterm" name="idm46045320795376">
     </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/comp_err.trace
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_comp_err_debug-info">
      </a>
      <a class="link" href="comp-err.html#option_comp_err_debug-info">
       <code class="option">
        --debug-info
       </code>
      </a>
      ,
      <code class="option">
       -T
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for debug-info">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --debug-info
          </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="idm46045320778368">
     </a>
     <a class="indexterm" name="idm46045320776880">
     </a>
     <p>
      Print some debugging information when the program exits.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_comp_err_errmsg-file">
      </a>
      <a class="link" href="comp-err.html#option_comp_err_errmsg-file">
       <code class="option">
        --errmsg-file=
        <em class="replaceable">
         <code>
          file_name
         </code>
        </em>
       </code>
      </a>
      ,
      <code class="option">
       -H
       <em class="replaceable">
        <code>
         file_name
        </code>
       </em>
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for errmsg-file">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --errmsg-file=name
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          File name
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           mysqld_errmsg.h
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045320761488">
     </a>
     <a class="indexterm" name="idm46045320760000">
     </a>
     <p>
      The name of the error message file. The default is
      <code class="filename">
       mysqld_errmsg.h
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_comp_err_header-file">
      </a>
      <a class="link" href="comp-err.html#option_comp_err_header-file">
       <code class="option">
        --header-file=
        <em class="replaceable">
         <code>
          file_name
         </code>
        </em>
       </code>
      </a>
      ,
      <code class="option">
       -H
       <em class="replaceable">
        <code>
         file_name
        </code>
       </em>
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for header-file">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --header-file=name
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          File name
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           mysqld_error.h
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045320744048">
     </a>
     <a class="indexterm" name="idm46045320742560">
     </a>
     <p>
      The name of the error header file. The default is
      <code class="filename">
       mysqld_error.h
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_comp_err_in-file-errlog">
      </a>
      <a class="link" href="comp-err.html#option_comp_err_in-file-errlog">
       <code class="option">
        --in-file-errlog=
        <em class="replaceable">
         <code>
          file_name
         </code>
        </em>
       </code>
      </a>
      ,
      <code class="option">
       -e
       <em class="replaceable">
        <code>
         file_name
        </code>
       </em>
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for in-file-errlog">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --in-file-errlog
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          File name
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           ../share/messages_to_error_log.txt
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045320726480">
     </a>
     <a class="indexterm" name="idm46045320724992">
     </a>
     <p>
      The name of the input file that defines error messages
            intended to be written to the error log. The default is
      <code class="filename">
       ../share/messages_to_error_log.txt
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_comp_err_in-file-toclient">
      </a>
      <a class="link" href="comp-err.html#option_comp_err_in-file-toclient">
       <code class="option">
        --in-file-toclient=
        <em class="replaceable">
         <code>
          file_name
         </code>
        </em>
       </code>
      </a>
      ,
      <code class="option">
       -c
       <em class="replaceable">
        <code>
         file_name
        </code>
       </em>
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for in-file-toclient">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --in-file-toclient=path
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          File name
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           ../share/messages_to_clients.txt
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045320708896">
     </a>
     <a class="indexterm" name="idm46045320707408">
     </a>
     <p>
      The name of the input file that defines error messages
            intended to be written to clients. The default is
      <code class="filename">
       ../share/messages_to_clients.txt
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_comp_err_name-file">
      </a>
      <a class="link" href="comp-err.html#option_comp_err_name-file">
       <code class="option">
        --name-file=
        <em class="replaceable">
         <code>
          file_name
         </code>
        </em>
       </code>
      </a>
      ,
      <code class="option">
       -N
       <em class="replaceable">
        <code>
         file_name
        </code>
       </em>
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for name-file">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --name-file=name
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          File name
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           mysqld_ername.h
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045320691280">
     </a>
     <a class="indexterm" name="idm46045320689792">
     </a>
     <p>
      The name of the error name file. The default is
      <code class="filename">
       mysqld_ername.h
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_comp_err_out-dir">
      </a>
      <a class="link" href="comp-err.html#option_comp_err_out-dir">
       <code class="option">
        --out-dir=
        <em class="replaceable">
         <code>
          dir_name
         </code>
        </em>
       </code>
      </a>
      ,
      <code class="option">
       -D
       <em class="replaceable">
        <code>
         dir_name
        </code>
       </em>
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for out-dir">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --out-dir=path
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          String
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           ../share/
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045320673872">
     </a>
     <a class="indexterm" name="idm46045320672384">
     </a>
     <p>
      The name of the output base directory. The default is
      <code class="filename">
       ../sql/share/
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_comp_err_out-file">
      </a>
      <a class="link" href="comp-err.html#option_comp_err_out-file">
       <code class="option">
        --out-file=
        <em class="replaceable">
         <code>
          file_name
         </code>
        </em>
       </code>
      </a>
      ,
      <code class="option">
       -O
       <em class="replaceable">
        <code>
         file_name
        </code>
       </em>
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for out-file">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --out-file=name
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          File name
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           errmsg.sys
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045320656336">
     </a>
     <a class="indexterm" name="idm46045320654848">
     </a>
     <p>
      The name of the output file. The default is
      <code class="filename">
       errmsg.sys
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_comp_err_version">
      </a>
      <a class="link" href="comp-err.html#option_comp_err_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>
        <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="idm46045320639568">
     </a>
     <a class="indexterm" name="idm46045320638080">
     </a>
     <p>
      Display version information and exit.
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
