<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="perror">
      </a>
      6.8.1 perror — Display MySQL Error Message Information
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045302872992">
  </a>
  <a class="indexterm" name="idm46045302872080">
  </a>
  <a class="indexterm" name="idm46045302870720">
  </a>
  <a class="indexterm" name="idm46045302869776">
  </a>
  <p>
   <a class="link" href="perror.html" title="6.8.1 perror — Display MySQL Error Message Information">
    <span class="command">
     <strong>
      perror
     </strong>
    </span>
   </a>
   displays the error message for MySQL
        or operating system error codes. Invoke
   <a class="link" href="perror.html" title="6.8.1 perror — Display MySQL Error Message Information">
    <span class="command">
     <strong>
      perror
     </strong>
    </span>
   </a>
   like this:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa9371941"><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">perror <span class="token punctuation">[</span><em class="replaceable">options</em><span class="token punctuation">]</span> <em class="replaceable">errorcode</em> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></code></pre>
  </div>
  <p>
   <a class="link" href="perror.html" title="6.8.1 perror — Display MySQL Error Message Information">
    <span class="command">
     <strong>
      perror
     </strong>
    </span>
   </a>
   attempts to be flexible in
        understanding its arguments. For example, for the
   <a class="ulink" href="/doc/mysql-errors/8.4/en/server-error-reference.html#error_er_wrong_value_for_var" target="_top">
    <code class="literal">
     ER_WRONG_VALUE_FOR_VAR
    </code>
   </a>
   error,
   <a class="link" href="perror.html" title="6.8.1 perror — Display MySQL Error Message Information">
    <span class="command">
     <strong>
      perror
     </strong>
    </span>
   </a>
   understands any of these arguments:
   <code class="option">
    1231
   </code>
   ,
   <code class="literal">
    001231
   </code>
   ,
   <code class="literal">
    MY-1231
   </code>
   , or
   <code class="literal">
    MY-001231
   </code>
   , or
   <a class="ulink" href="/doc/mysql-errors/8.4/en/server-error-reference.html#error_er_wrong_value_for_var" target="_top">
    <code class="literal">
     ER_WRONG_VALUE_FOR_VAR
    </code>
   </a>
   .
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa49901359"><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"><span class="token prompt">$&gt; </span><span class="token command">perror</span> 1231
MySQL error code MY-001231 <span class="token punctuation">(</span>ER_WRONG_VALUE_FOR_VAR<span class="token punctuation">)</span><span class="token punctuation">:</span> Variable <span class="token atrule">'%-.64s'</span>
can<span class="token atrule">'t be set to the value of '</span>%-<span class="token punctuation">.</span>200s'</code></pre>
  </div>
  <p>
   If an error number is in the range where MySQL and operating
        system errors overlap,
   <a class="link" href="perror.html" title="6.8.1 perror — Display MySQL Error Message Information">
    <span class="command">
     <strong>
      perror
     </strong>
    </span>
   </a>
   displays both
        error messages:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa30093446"><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"><span class="token prompt">$&gt; </span><span class="token command">perror</span> 1 13
OS error code   1<span class="token punctuation">:</span>  Operation not permitted
MySQL error code MY-000001<span class="token punctuation">:</span> Can<span class="token atrule">'t create/write to file '</span>%s' <span class="token punctuation">(</span>OS errno %d - %s<span class="token punctuation">)</span>
OS error code  13<span class="token punctuation">:</span>  Permission denied
MySQL error code MY-000013<span class="token punctuation">:</span> Can<span class="token atrule">'t get stat of '</span>%s' <span class="token punctuation">(</span>OS errno %d - %s<span class="token punctuation">)</span></code></pre>
  </div>
  <p>
   To obtain the error message for a MySQL Cluster error code, use
        the
   <a class="link" href="mysql-cluster-programs-ndb-perror.html" title="25.5.16 ndb_perror — Obtain NDB Error Message Information">
    <span class="command">
     <strong>
      ndb_perror
     </strong>
    </span>
   </a>
   utility.
  </p>
  <p>
   The meaning of system error messages may be dependent on your
        operating system. A given error code may mean different things
        on different operating systems.
  </p>
  <p>
   <a class="link" href="perror.html" title="6.8.1 perror — Display MySQL Error Message Information">
    <span class="command">
     <strong>
      perror
     </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_perror_help">
      </a>
      <a class="link" href="perror.html#option_perror_help">
       <code class="option">
        --help
       </code>
      </a>
      ,
      <a class="link" href="perror.html#option_perror_help">
       <code class="option">
        --info
       </code>
      </a>
      ,
      <code class="option">
       -I
      </code>
      ,
      <code class="option">
       -?
      </code>
     </p>
     <a class="indexterm" name="idm46045302842304">
     </a>
     <a class="indexterm" name="idm46045302840816">
     </a>
     <p>
      Display a help message and exit.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_perror_silent">
      </a>
      <a class="link" href="perror.html#option_perror_silent">
       <code class="option">
        --silent
       </code>
      </a>
      ,
      <code class="option">
       -s
      </code>
     </p>
     <a class="indexterm" name="idm46045302836240">
     </a>
     <a class="indexterm" name="idm46045302834752">
     </a>
     <p>
      Silent mode. Print only the error message.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_perror_verbose">
      </a>
      <a class="link" href="perror.html#option_perror_verbose">
       <code class="option">
        --verbose
       </code>
      </a>
      ,
      <code class="option">
       -v
      </code>
     </p>
     <a class="indexterm" name="idm46045302830128">
     </a>
     <a class="indexterm" name="idm46045302828640">
     </a>
     <p>
      Verbose mode. Print error code and message. This is the
            default behavior.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_perror_version">
      </a>
      <a class="link" href="perror.html#option_perror_version">
       <code class="option">
        --version
       </code>
      </a>
      ,
      <code class="option">
       -V
      </code>
     </p>
     <a class="indexterm" name="idm46045302823920">
     </a>
     <a class="indexterm" name="idm46045302822432">
     </a>
     <p>
      Display version information and exit.
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
