<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h2 class="title">
      <a name="manual-info">
      </a>
      1.1 About This Manual
     </h2>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045335341328">
  </a>
  <a class="indexterm" name="idm46045335340320">
  </a>
  <p>
   This is the Reference Manual for the MySQL Database System,
      version 8.4, through release 8.4.3.
      Differences between minor versions of MySQL 8.4 are
      noted in the present text with reference to release numbers
      (8.4.
   <em class="replaceable">
    <code>
     x
    </code>
   </em>
   ). For license
      information, see the
   <a class="link" href="preface.html#legalnotice" title="Legal Notices">
    Legal
      Notices
   </a>
   .
  </p>
  <p>
   This manual is not intended for use with older versions of the
      MySQL software due to the many functional and other differences
      between MySQL 8.4 and previous versions. If you are
      using an earlier release of the MySQL software, please refer to
      the appropriate manual. For example, the
   <a class="ulink" href="/doc/refman/8.0/en/" target="_top">
    MySQL 8.0
      Reference Manual
   </a>
   covers the 8.0 bugfix series of MySQL
      software releases.
  </p>
  <p>
   Because this manual serves as a reference, it does not provide
      general instruction on SQL or relational database concepts. It
      also does not teach you how to use your operating system or
      command-line interpreter.
  </p>
  <p>
   The MySQL Database Software is under constant development, and the
      Reference Manual is updated frequently as well. The most recent
      version of the manual is available online in searchable form at
   <a class="ulink" href="/doc/" target="_top">
    https://dev.mysql.com/doc/
   </a>
   . Other formats also are available
      there, including downloadable HTML and PDF versions.
  </p>
  <a class="indexterm" name="idm46045335333616">
  </a>
  <p>
   The source code for MySQL itself contains internal documentation
      written using Doxygen. The generated Doxygen content is available
      from
   <a class="ulink" href="/doc/index-other.html" target="_top">
    https://dev.mysql.com/doc/index-other.html
   </a>
   . It is also
      possible to generate this content locally from a MySQL source
      distribution using the instructions at
   <a class="xref" href="source-installation-doxygen.html" title="2.8.10 Generating MySQL Doxygen Documentation Content">
    Section 2.8.10, “Generating MySQL Doxygen Documentation Content”
   </a>
   .
  </p>
  <p>
   If you have questions about using MySQL, join the
   <a class="ulink" href="https://mysqlcommunity.slack.com/" target="_blank">
    MySQL Community
      Slack
   </a>
   . If you have suggestions concerning additions or
      corrections to the manual itself, please send them to the
   <a class="ulink" href="http://www.mysql.com/company/contact/" target="_blank">
    http://www.mysql.com/company/contact/
   </a>
   .
  </p>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="manual-conventions">
       </a>
       Typographical and Syntax Conventions
      </h3>
     </div>
    </div>
   </div>
   <p>
    This manual uses certain typographical conventions:
   </p>
   <a class="indexterm" name="idm46045335327216">
   </a>
   <a class="indexterm" name="idm46045335325824">
   </a>
   <a class="indexterm" name="idm46045335324816">
   </a>
   <a class="indexterm" name="idm46045335323424">
   </a>
   <a class="indexterm" name="idm46045335322032">
   </a>
   <a class="indexterm" name="idm46045335321024">
   </a>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <code class="literal">
        Text in this style
       </code>
       is used for SQL
        statements; database, table, and column names; program listings
        and source code; and environment variables. Example:
       <span class="quote">
        “
        <span class="quote">
         To
        reload the grant tables, use the
         <a class="link" href="flush.html#flush-privileges">
          <code class="literal">
           FLUSH
        PRIVILEGES
          </code>
         </a>
         statement.
        </span>
        ”
       </span>
      </p>
     </li>
     <li class="listitem">
      <p>
       <strong class="userinput">
        <code>
         Text in this style
        </code>
       </strong>
       indicates input that
        you type in examples.
      </p>
     </li>
     <li class="listitem">
      <p>
       <span class="command">
        <strong>
         Text in this style
        </strong>
       </span>
       indicates the names of
        executable programs and scripts, examples being
       <a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
        <span class="command">
         <strong>
          mysql
         </strong>
        </span>
       </a>
       (the MySQL command-line client program)
        and
       <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
        <span class="command">
         <strong>
          mysqld
         </strong>
        </span>
       </a>
       (the MySQL server executable).
      </p>
     </li>
     <li class="listitem">
      <p>
       <em class="replaceable">
        <code>
         Text in this style
        </code>
       </em>
       is used for
        variable input for which you should substitute a value of your
        own choosing.
      </p>
     </li>
     <li class="listitem">
      <p>
       <span class="emphasis">
        <em>
         Text in this style
        </em>
       </span>
       is used for emphasis.
      </p>
     </li>
     <li class="listitem">
      <p>
       <span class="bold">
        <strong>
         Text in this style
        </strong>
       </span>
       is used in
        table headings and to convey especially strong emphasis.
      </p>
     </li>
     <li class="listitem">
      <p>
       <code class="option">
        Text in this style
       </code>
       is used to indicate a
        program option that affects how the program is executed, or that
        supplies information that is needed for the program to function
        in a certain way.
       <span class="emphasis">
        <em>
         Example
        </em>
       </span>
       :
       <span class="quote">
        “
        <span class="quote">
         The
         <code class="option">
          --host
         </code>
         option (short form
         <code class="option">
          -h
         </code>
         )
        tells the
         <a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
          <span class="command">
           <strong>
            mysql
           </strong>
          </span>
         </a>
         client program the hostname
        or IP address of the MySQL server that it should connect
        to
        </span>
        ”
       </span>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       File names and directory names are written like this:
       <span class="quote">
        “
        <span class="quote">
         The
        global
         <code class="filename">
          my.cnf
         </code>
         file is located in the
         <code class="filename">
          /etc
         </code>
         directory.
        </span>
        ”
       </span>
      </p>
     </li>
     <li class="listitem">
      <p>
       Character sequences are written like this:
       <span class="quote">
        “
        <span class="quote">
         To specify a
        wildcard, use the
         <span class="quote">
          ‘
          <span class="quote">
           <code class="literal">
            %
           </code>
          </span>
          ’
         </span>
         character.
        </span>
        ”
       </span>
      </p>
     </li>
    </ul>
   </div>
   <p>
    When commands or statements are prefixed by a prompt, we use these:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa73592481"><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">type</span> a command here
<span class="token prompt">#&gt; </span><span class="token command">type</span> a command as <em class="replaceable">root</em> here
<span class="token prompt">C:\&gt;</span><span class="token command"> type</span> a command here <span class="token punctuation">(</span>Windows only<span class="token punctuation">)</span>
<span class="token prompt">mysql&gt;</span><span class="token command"> type</span> a mysql statement here</code></pre>
   </div>
   <p>
    Commands are issued in your command interpreter. On Unix, this is
    typically a program such as
    <span class="command">
     <strong>
      sh
     </strong>
    </span>
    ,
    <span class="command">
     <strong>
      csh
     </strong>
    </span>
    , or
    <span class="command">
     <strong>
      bash
     </strong>
    </span>
    . On Windows, the
    equivalent program is
    <span class="command">
     <strong>
      command.com
     </strong>
    </span>
    or
    <span class="command">
     <strong>
      cmd.exe
     </strong>
    </span>
    , typically run in a console window.
    Statements prefixed by
    <code class="literal">
     mysql
    </code>
    are issued in the
    <a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
     <span class="command">
      <strong>
       mysql
      </strong>
     </span>
    </a>
    command-line client.
   </p>
   <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
    <div class="admon-title">
     Note
    </div>
    <p>
     When you enter a command or statement shown in an example, do not
      type the prompt shown in the example.
    </p>
   </div>
   <p>
    In some areas different systems may be distinguished from each other
    to show that commands should be executed in two different
    environments. For example, while working with replication the
    commands might be prefixed with
    <code class="literal">
     source
    </code>
    and
    <code class="literal">
     replica
    </code>
    :
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa46009648"><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-sql"><span class="token prompt">source&gt;</span> <span class="token keyword">type</span> a mysql statement <span class="token keyword">on</span> the <span class="token keyword">replication</span> <span class="token keyword">source</span> here
<span class="token prompt">replica&gt;</span> <span class="token keyword">type</span> a mysql statement <span class="token keyword">on</span> the <span class="token keyword">replica</span> here</code></pre>
   </div>
   <p>
    Database, table, and column names must often be substituted into
    statements. To indicate that such substitution is necessary, this
    manual uses
    <em class="replaceable">
     <code>
      db_name
     </code>
    </em>
    ,
    <em class="replaceable">
     <code>
      tbl_name
     </code>
    </em>
    , and
    <em class="replaceable">
     <code>
      col_name
     </code>
    </em>
    . For example, you might see a
    statement like this:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa21082747"><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-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> <em class="replaceable">col_name</em> <span class="token keyword">FROM</span> <em class="replaceable">db_name</em><span class="token punctuation">.</span><em class="replaceable">tbl_name</em><span class="token punctuation">;</span></code></pre>
   </div>
   <p>
    This means that if you were to enter a similar statement, you would
    supply your own database, table, and column names, perhaps like
    this:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa73155833"><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-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> author_name <span class="token keyword">FROM</span> biblio_db<span class="token punctuation">.</span>author_list<span class="token punctuation">;</span></code></pre>
   </div>
   <p>
    SQL keywords are not case-sensitive and may be written in any
    lettercase. This manual uses uppercase.
   </p>
   <p>
    In syntax descriptions, square brackets
    (
    <span class="quote">
     “
     <span class="quote">
      <code class="literal">
       [
      </code>
     </span>
     ”
    </span>
    and
    <span class="quote">
     “
     <span class="quote">
      <code class="literal">
       ]
      </code>
     </span>
     ”
    </span>
    ) indicate optional words or
    clauses. For example, in the following statement,
    <code class="literal">
     IF
    EXISTS
    </code>
    is optional:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa53970195"><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-sql"><span class="token keyword">DROP</span> <span class="token keyword">TABLE</span> <span class="token punctuation">[</span><span class="token keyword">IF</span> <span class="token keyword">EXISTS</span><span class="token punctuation">]</span> <em class="replaceable">tbl_name</em></code></pre>
   </div>
   <p>
    When a syntax element consists of a number of alternatives, the
    alternatives are separated by vertical bars
    (
    <span class="quote">
     “
     <span class="quote">
      <code class="literal">
       |
      </code>
     </span>
     ”
    </span>
    ). When one member from a set of
    choices
    <span class="emphasis">
     <em>
      may
     </em>
    </span>
    be chosen, the alternatives are
    listed within square brackets (
    <span class="quote">
     “
     <span class="quote">
      <code class="literal">
       [
      </code>
     </span>
     ”
    </span>
    and
    <span class="quote">
     “
     <span class="quote">
      <code class="literal">
       ]
      </code>
     </span>
     ”
    </span>
    ):
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa2429763"><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-sql"><span class="token function">TRIM</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token punctuation">[</span><span class="token keyword">BOTH</span> <span class="token operator">|</span> <span class="token keyword">LEADING</span> <span class="token operator">|</span> <span class="token keyword">TRAILING</span><span class="token punctuation">]</span> <span class="token punctuation">[</span><em class="replaceable">remstr</em><span class="token punctuation">]</span> <span class="token keyword">FROM</span><span class="token punctuation">]</span> <em class="replaceable">str</em><span class="token punctuation">)</span></code></pre>
   </div>
   <p>
    When one member from a set of choices
    <span class="emphasis">
     <em>
      must
     </em>
    </span>
    be
    chosen, the alternatives are listed within braces
    (
    <span class="quote">
     “
     <span class="quote">
      <code class="literal">
       {
      </code>
     </span>
     ”
    </span>
    and
    <span class="quote">
     “
     <span class="quote">
      <code class="literal">
       }
      </code>
     </span>
     ”
    </span>
    ):
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa72667936"><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-sql">{<span class="token keyword">DESCRIBE</span> <span class="token operator">|</span> <span class="token keyword">DESC</span>} <em class="replaceable">tbl_name</em> <span class="token punctuation">[</span><em class="replaceable">col_name</em> <span class="token operator">|</span> <em class="replaceable">wild</em><span class="token punctuation">]</span></code></pre>
   </div>
   <p>
    An ellipsis (
    <code class="literal">
     ...
    </code>
    ) indicates the omission of a
    section of a statement, typically to provide a shorter version of
    more complex syntax. For example,
    <a class="link" href="select.html" title="15.2.13 SELECT Statement">
     <code class="literal">
      SELECT ... INTO
    OUTFILE
     </code>
    </a>
    is shorthand for the form of
    <a class="link" href="select.html" title="15.2.13 SELECT Statement">
     <code class="literal">
      SELECT
     </code>
    </a>
    statement that has an
    <code class="literal">
     INTO OUTFILE
    </code>
    clause following other parts of the
    statement.
   </p>
   <p>
    An ellipsis can also indicate that the preceding syntax element of a
    statement may be repeated. In the following example, multiple
    <em class="replaceable">
     <code>
      reset_option
     </code>
    </em>
    values may be given, with
    each of those after the first preceded by commas:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa85436636"><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-sql"><span class="token keyword">RESET</span> <em class="replaceable">reset_option</em> <span class="token punctuation">[</span><span class="token punctuation">,</span><em class="replaceable">reset_option</em><span class="token punctuation">]</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></code></pre>
   </div>
   <p>
    Commands for setting shell variables are shown using Bourne shell
    syntax. For example, the sequence to set the
    <code class="literal">
     CC
    </code>
    environment variable and run the
    <span class="command">
     <strong>
      configure
     </strong>
    </span>
    command looks like this in Bourne shell syntax:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa50803970"><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">CC</span><span class="token attr-value"><span class="token punctuation">=</span>gcc</span> <span class="token punctuation">.</span>/configure</code></pre>
   </div>
   <a class="indexterm" name="idm46045335254704">
   </a>
   <a class="indexterm" name="idm46045335253696">
   </a>
   <p>
    If you are using
    <span class="command">
     <strong>
      csh
     </strong>
    </span>
    or
    <span class="command">
     <strong>
      tcsh
     </strong>
    </span>
    ,
    you must issue commands somewhat differently:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa66377055"><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">setenv</span> CC gcc
<span class="token prompt">$&gt; </span><span class="token command">./configure</span></code></pre>
   </div>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="manual-authorship">
       </a>
       Manual Authorship
      </h3>
     </div>
    </div>
   </div>
   <a class="indexterm" name="idm46045335247936">
   </a>
   <p>
    The Reference Manual source files are written in DocBook XML
        format. The HTML version and other formats are produced
        automatically, primarily using the DocBook XSL stylesheets. For
        information about DocBook, see
    <a class="ulink" href="http://docbook.org/" target="_blank">
     http://docbook.org/
    </a>
   </p>
   <p>
    This manual was originally written by David Axmark and Michael
    <span class="quote">
     “
     <span class="quote">
      Monty
     </span>
     ”
    </span>
    Widenius. It is maintained by the MySQL
        Documentation Team, consisting of Edward Gilmore, Stefan Hinz,
        David Hollis, Philip Olson, Daniel So, and Jon Stephens.
   </p>
  </div>
 </div>
 <br/>
</div>
