<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h2 class="title">
      <a name="system-schema">
      </a>
      7.3 The mysql System Schema
     </h2>
    </div>
   </div>
  </div>
  <p>
   The
   <code class="literal">
    mysql
   </code>
   schema is the system schema. It
      contains tables that store information required by the MySQL
      server as it runs. A broad categorization is that the
   <code class="literal">
    mysql
   </code>
   schema contains data dictionary tables
      that store database object metadata, and system tables used for
      other operational purposes. The following discussion further
      subdivides the set of system tables into smaller categories.
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a class="xref" href="system-schema.html#system-schema-data-dictionary-tables" title="Data Dictionary Tables">
       Data Dictionary Tables
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="system-schema.html#system-schema-grant-tables" title="Grant System Tables">
       Grant System Tables
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="system-schema.html#system-schema-object-tables" title="Object Information System Tables">
       Object Information System Tables
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="system-schema.html#system-schema-log-tables" title="Log System Tables">
       Log System Tables
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="system-schema.html#system-schema-help-tables" title="Server-Side Help System Tables">
       Server-Side Help System Tables
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="system-schema.html#system-schema-time-zone-tables" title="Time Zone System Tables">
       Time Zone System Tables
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="system-schema.html#system-schema-replication-tables" title="Replication System Tables">
       Replication System Tables
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="system-schema.html#system-schema-optimizer-tables" title="Optimizer System Tables">
       Optimizer System Tables
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="system-schema.html#system-schema-miscellaneous-tables" title="Miscellaneous System Tables">
       Miscellaneous System Tables
      </a>
     </p>
    </li>
   </ul>
  </div>
  <p>
   The remainder of this section enumerates the tables in each
      category, with cross references for additional information. Data
      dictionary tables and system tables use the
   <code class="literal">
    InnoDB
   </code>
   storage engine unless otherwise
      indicated.
  </p>
  <p>
   <code class="literal">
    mysql
   </code>
   system tables and data dictionary tables
      reside in a single
   <code class="literal">
    InnoDB
   </code>
   tablespace file named
   <code class="filename">
    mysql.ibd
   </code>
   in the MySQL data directory.
      Previously, these tables were created in individual tablespace
      files in the
   <code class="literal">
    mysql
   </code>
   database directory.
  </p>
  <p>
   Data-at-rest encryption can be enabled for the
   <code class="literal">
    mysql
   </code>
   system schema tablespace. For more
      information, see
   <a class="xref" href="innodb-data-encryption.html" title="17.13 InnoDB Data-at-Rest Encryption">
    Section 17.13, “InnoDB Data-at-Rest Encryption”
   </a>
   .
  </p>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="system-schema-data-dictionary-tables">
       </a>
       Data Dictionary Tables
      </h3>
     </div>
    </div>
   </div>
   <p>
    These tables comprise the data dictionary, which contains
        metadata about database objects. For additional information, see
    <a class="xref" href="data-dictionary.html" title="Chapter 16 MySQL Data Dictionary">
     Chapter 16,
     <i>
      MySQL Data Dictionary
     </i>
    </a>
    .
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <code class="literal">
        catalogs
       </code>
       : Catalog information.
      </p>
      <a class="indexterm" name="idm46045259885920">
      </a>
      <a class="indexterm" name="idm46045259884432">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        character_sets
       </code>
       : Information about
            available character sets.
      </p>
      <a class="indexterm" name="idm46045259881408">
      </a>
      <a class="indexterm" name="idm46045259879920">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        check_constraints
       </code>
       : Information about
       <code class="literal">
        CHECK
       </code>
       constraints defined on tables. See
       <a class="xref" href="create-table-check-constraints.html" title="15.1.20.6 CHECK Constraints">
        Section 15.1.20.6, “CHECK Constraints”
       </a>
       .
      </p>
      <a class="indexterm" name="idm46045259875312">
      </a>
      <a class="indexterm" name="idm46045259873824">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        collations
       </code>
       : Information about collations
            for each character set.
      </p>
      <a class="indexterm" name="idm46045259870784">
      </a>
      <a class="indexterm" name="idm46045259869296">
      </a>
     </li>
     <li class="listitem">
      <p>
       <a class="indexterm" name="idm46045259867168">
       </a>
       <a class="indexterm" name="idm46045259865680">
       </a>
       <code class="literal">
        column_statistics
       </code>
       : Histogram statistics
            for column values. See
       <a class="xref" href="optimizer-statistics.html" title="10.9.6 Optimizer Statistics">
        Section 10.9.6, “Optimizer Statistics”
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        column_type_elements
       </code>
       : Information about
            types used by columns.
      </p>
      <a class="indexterm" name="idm46045259861136">
      </a>
      <a class="indexterm" name="idm46045259859632">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        columns
       </code>
       : Information about columns in
            tables.
      </p>
      <a class="indexterm" name="idm46045259856592">
      </a>
      <a class="indexterm" name="idm46045259855104">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        dd_properties
       </code>
       : A table that identifies
            data dictionary properties, such as its version. The server
            uses this to determine whether the data dictionary must be
            upgraded to a newer version.
      </p>
      <a class="indexterm" name="idm46045259851920">
      </a>
      <a class="indexterm" name="idm46045259850432">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        events
       </code>
       : Information about Event Scheduler
            events. See
       <a class="xref" href="event-scheduler.html" title="27.4 Using the Event Scheduler">
        Section 27.4, “Using the Event Scheduler”
       </a>
       . If the server
            is started with the
       <a class="link" href="server-options.html#option_mysqld_skip-grant-tables">
        <code class="option">
         --skip-grant-tables
        </code>
       </a>
       option,
            the event scheduler is disabled and events registered in the
            table do not run. See
       <a class="xref" href="events-configuration.html" title="27.4.2 Event Scheduler Configuration">
        Section 27.4.2, “Event Scheduler Configuration”
       </a>
       .
      </p>
      <a class="indexterm" name="idm46045259844736">
      </a>
      <a class="indexterm" name="idm46045259843248">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        foreign_keys
       </code>
       ,
       <code class="literal">
        foreign_key_column_usage
       </code>
       : Information
            about foreign keys.
      </p>
      <a class="indexterm" name="idm46045259839488">
      </a>
      <a class="indexterm" name="idm46045259838000">
      </a>
      <a class="indexterm" name="idm46045259836512">
      </a>
      <a class="indexterm" name="idm46045259835008">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        index_column_usage
       </code>
       : Information about
            columns used by indexes.
      </p>
      <a class="indexterm" name="idm46045259831968">
      </a>
      <a class="indexterm" name="idm46045259830464">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        index_partitions
       </code>
       : Information about
            partitions used by indexes.
      </p>
      <a class="indexterm" name="idm46045259827424">
      </a>
      <a class="indexterm" name="idm46045259825936">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        index_stats
       </code>
       : Used to store dynamic index
            statistics generated when
       <a class="link" href="analyze-table.html" title="15.7.3.1 ANALYZE TABLE Statement">
        <code class="literal">
         ANALYZE
            TABLE
        </code>
       </a>
       is executed.
      </p>
      <a class="indexterm" name="idm46045259821648">
      </a>
      <a class="indexterm" name="idm46045259820160">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        indexes
       </code>
       : Information about table indexes.
      </p>
      <a class="indexterm" name="idm46045259817152">
      </a>
      <a class="indexterm" name="idm46045259815664">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        innodb_ddl_log
       </code>
       : Stores DDL logs for
            crash-safe DDL operations.
      </p>
      <a class="indexterm" name="idm46045259812640">
      </a>
      <a class="indexterm" name="idm46045259811152">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        parameter_type_elements
       </code>
       : Information
            about stored procedure and function parameters, and about
            return values for stored functions.
      </p>
      <a class="indexterm" name="idm46045259808048">
      </a>
      <a class="indexterm" name="idm46045259806544">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        parameters
       </code>
       : Information about stored
            procedures and functions. See
       <a class="xref" href="stored-routines.html" title="27.2 Using Stored Routines">
        Section 27.2, “Using Stored Routines”
       </a>
       .
      </p>
      <a class="indexterm" name="idm46045259802640">
      </a>
      <a class="indexterm" name="idm46045259801152">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        resource_groups
       </code>
       : Information about
            resource groups. See
       <a class="xref" href="resource-groups.html" title="7.1.16 Resource Groups">
        Section 7.1.16, “Resource Groups”
       </a>
       .
      </p>
      <a class="indexterm" name="idm46045259797472">
      </a>
      <a class="indexterm" name="idm46045259795984">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        routines
       </code>
       : Information about stored
            procedures and functions. See
       <a class="xref" href="stored-routines.html" title="27.2 Using Stored Routines">
        Section 27.2, “Using Stored Routines”
       </a>
       .
      </p>
      <a class="indexterm" name="idm46045259792272">
      </a>
      <a class="indexterm" name="idm46045259790784">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        schemata
       </code>
       : Information about schemata. In
            MySQL, a schema is a database, so this table provides
            information about databases.
      </p>
      <a class="indexterm" name="idm46045259787680">
      </a>
      <a class="indexterm" name="idm46045259786192">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        st_spatial_reference_systems
       </code>
       : Information
            about available spatial reference systems for spatial data.
      </p>
      <a class="indexterm" name="idm46045259783120">
      </a>
      <a class="indexterm" name="idm46045259781616">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        table_partition_values
       </code>
       : Information about
            values used by table partitions.
      </p>
      <a class="indexterm" name="idm46045259778560">
      </a>
      <a class="indexterm" name="idm46045259777056">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        table_partitions
       </code>
       : Information about
            partitions used by tables.
      </p>
      <a class="indexterm" name="idm46045259774016">
      </a>
      <a class="indexterm" name="idm46045259772528">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        table_stats
       </code>
       : Information about dynamic
            table statistics generated when
       <a class="link" href="analyze-table.html" title="15.7.3.1 ANALYZE TABLE Statement">
        <code class="literal">
         ANALYZE
            TABLE
        </code>
       </a>
       is executed.
      </p>
      <a class="indexterm" name="idm46045259768224">
      </a>
      <a class="indexterm" name="idm46045259766736">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        tables
       </code>
       : Information about tables in
            databases.
      </p>
      <a class="indexterm" name="idm46045259763712">
      </a>
      <a class="indexterm" name="idm46045259762224">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        tablespace_files
       </code>
       : Information about files
            used by tablespaces.
      </p>
      <a class="indexterm" name="idm46045259759200">
      </a>
      <a class="indexterm" name="idm46045259757712">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        tablespaces
       </code>
       : Information about active
            tablespaces.
      </p>
      <a class="indexterm" name="idm46045259754688">
      </a>
      <a class="indexterm" name="idm46045259753200">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        triggers
       </code>
       : Information about triggers.
      </p>
      <a class="indexterm" name="idm46045259750192">
      </a>
      <a class="indexterm" name="idm46045259748704">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        view_routine_usage
       </code>
       : Information about
            dependencies between views and stored functions used by
            them.
      </p>
      <a class="indexterm" name="idm46045259745632">
      </a>
      <a class="indexterm" name="idm46045259744128">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        view_table_usage
       </code>
       : Used to track
            dependencies between views and their underlying tables.
      </p>
      <a class="indexterm" name="idm46045259741056">
      </a>
      <a class="indexterm" name="idm46045259739568">
      </a>
     </li>
    </ul>
   </div>
   <p>
    Data dictionary tables are invisible. They cannot be read with
    <a class="link" href="select.html" title="15.2.13 SELECT Statement">
     <code class="literal">
      SELECT
     </code>
    </a>
    , do not appear in the
        output of
    <a class="link" href="show-tables.html" title="15.7.7.39 SHOW TABLES Statement">
     <code class="literal">
      SHOW TABLES
     </code>
    </a>
    , are not
        listed in the
    <code class="literal">
     INFORMATION_SCHEMA.TABLES
    </code>
    table, and so forth. However, in most cases there are
        corresponding
    <code class="literal">
     INFORMATION_SCHEMA
    </code>
    tables that
        can be queried. Conceptually, the
    <code class="literal">
     INFORMATION_SCHEMA
    </code>
    provides a view through
        which MySQL exposes data dictionary metadata. For example, you
        cannot select from the
    <code class="literal">
     mysql.schemata
    </code>
    table
        directly:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa17852283"><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> <span class="token operator">*</span> <span class="token keyword">FROM</span> mysql<span class="token punctuation">.</span>schemata<span class="token punctuation">;</span>
<span class="token output">ERROR 3554 (HY000)<span class="token punctuation">:</span> Access to data dictionary table 'mysql.schemata' is rejected.</span></code></pre>
   </div>
   <p>
    Instead, select that information from the corresponding
    <code class="literal">
     INFORMATION_SCHEMA
    </code>
    table:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa53997455"><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> <span class="token operator">*</span> <span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span>SCHEMATA\G
<span class="token output"><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
              CATALOG_NAME<span class="token punctuation">:</span> def
               SCHEMA_NAME<span class="token punctuation">:</span> mysql
DEFAULT_CHARACTER_SET_NAME<span class="token punctuation">:</span> utf8mb4
    DEFAULT_COLLATION_NAME<span class="token punctuation">:</span> utf8mb4_0900_ai_ci
                  SQL_PATH<span class="token punctuation">:</span> NULL
        DEFAULT_ENCRYPTION<span class="token punctuation">:</span> NO
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 2. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
              CATALOG_NAME<span class="token punctuation">:</span> def
               SCHEMA_NAME<span class="token punctuation">:</span> information_schema
DEFAULT_CHARACTER_SET_NAME<span class="token punctuation">:</span> utf8mb3
    DEFAULT_COLLATION_NAME<span class="token punctuation">:</span> utf8mb3_general_ci
                  SQL_PATH<span class="token punctuation">:</span> NULL
        DEFAULT_ENCRYPTION<span class="token punctuation">:</span> NO
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 3. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
              CATALOG_NAME<span class="token punctuation">:</span> def
               SCHEMA_NAME<span class="token punctuation">:</span> performance_schema
DEFAULT_CHARACTER_SET_NAME<span class="token punctuation">:</span> utf8mb4
    DEFAULT_COLLATION_NAME<span class="token punctuation">:</span> utf8mb4_0900_ai_ci
                  SQL_PATH<span class="token punctuation">:</span> NULL
        DEFAULT_ENCRYPTION<span class="token punctuation">:</span> NO
...</span></code></pre>
   </div>
   <p>
    There is no Information Schema table that corresponds exactly to
    <code class="literal">
     mysql.indexes
    </code>
    , but
    <a class="link" href="information-schema-statistics-table.html" title="28.3.34 The INFORMATION_SCHEMA STATISTICS Table">
     <code class="literal">
      INFORMATION_SCHEMA.STATISTICS
     </code>
    </a>
    contains much of the same information.
   </p>
   <p>
    As of yet, there are no
    <code class="literal">
     INFORMATION_SCHEMA
    </code>
    tables that correspond exactly to
    <code class="literal">
     mysql.foreign_keys
    </code>
    ,
    <code class="literal">
     mysql.foreign_key_column_usage
    </code>
    . The standard
        SQL way to obtain foreign key information is by using the
    <code class="literal">
     INFORMATION_SCHEMA
    </code>
    <a class="link" href="information-schema-referential-constraints-table.html" title="28.3.25 The INFORMATION_SCHEMA REFERENTIAL_CONSTRAINTS Table">
     <code class="literal">
      REFERENTIAL_CONSTRAINTS
     </code>
    </a>
    and
    <a class="link" href="information-schema-key-column-usage-table.html" title="28.3.16 The INFORMATION_SCHEMA KEY_COLUMN_USAGE Table">
     <code class="literal">
      KEY_COLUMN_USAGE
     </code>
    </a>
    tables; these
        tables are now implemented as views on the
    <code class="literal">
     foreign_keys
    </code>
    ,
    <code class="literal">
     foreign_key_column_usage
    </code>
    , and other data
        dictionary tables.
   </p>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="system-schema-grant-tables">
       </a>
       Grant System Tables
      </h3>
     </div>
    </div>
   </div>
   <p>
    These system tables contain grant information about user
        accounts and the privileges held by them. For additional
        information about the structure, contents, and purpose of the
        these tables, see
    <a class="xref" href="grant-tables.html" title="8.2.3 Grant Tables">
     Section 8.2.3, “Grant Tables”
    </a>
    .
   </p>
   <p>
    The MySQL 8.4 grant tables are
    <a class="link" href="innodb-storage-engine.html" title="Chapter 17 The InnoDB Storage Engine">
     <code class="literal">
      InnoDB
     </code>
    </a>
    (transactional) tables.
        Account-management statements are transactional and either
        succeed for all named users or roll back and have no effect if
        any error occurs.
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <code class="literal">
        user
       </code>
       : User accounts, global privileges,
            and other nonprivilege columns.
      </p>
      <a class="indexterm" name="idm46045259710416">
      </a>
      <a class="indexterm" name="idm46045259708928">
      </a>
      <a class="indexterm" name="idm46045259707440">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        global_grants
       </code>
       : Assignments of dynamic
            global privileges to users; see
       <a class="xref" href="privileges-provided.html#static-dynamic-privileges" title="Static Versus Dynamic Privileges">
        Static Versus Dynamic Privileges
       </a>
       .
      </p>
      <a class="indexterm" name="idm46045259703472">
      </a>
      <a class="indexterm" name="idm46045259701984">
      </a>
      <a class="indexterm" name="idm46045259700496">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        db
       </code>
       : Database-level privileges.
      </p>
      <a class="indexterm" name="idm46045259697536">
      </a>
      <a class="indexterm" name="idm46045259696048">
      </a>
      <a class="indexterm" name="idm46045259694560">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        tables_priv
       </code>
       : Table-level privileges.
      </p>
      <a class="indexterm" name="idm46045259691568">
      </a>
      <a class="indexterm" name="idm46045259690080">
      </a>
      <a class="indexterm" name="idm46045259688592">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        columns_priv
       </code>
       : Column-level privileges.
      </p>
      <a class="indexterm" name="idm46045259685600">
      </a>
      <a class="indexterm" name="idm46045259684112">
      </a>
      <a class="indexterm" name="idm46045259682624">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        procs_priv
       </code>
       : Stored procedure and function
            privileges.
      </p>
      <a class="indexterm" name="idm46045259679600">
      </a>
      <a class="indexterm" name="idm46045259678112">
      </a>
      <a class="indexterm" name="idm46045259676624">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        proxies_priv
       </code>
       : Proxy-user privileges.
      </p>
      <a class="indexterm" name="idm46045259673632">
      </a>
      <a class="indexterm" name="idm46045259672144">
      </a>
      <a class="indexterm" name="idm46045259670656">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        default_roles
       </code>
       : This table lists default
            roles to be activated after a user connects and
            authenticates, or executes
       <a class="link" href="set-role.html" title="15.7.1.11 SET ROLE Statement">
        <code class="literal">
         SET ROLE
            DEFAULT
        </code>
       </a>
       .
      </p>
      <a class="indexterm" name="idm46045259666304">
      </a>
      <a class="indexterm" name="idm46045259664816">
      </a>
      <a class="indexterm" name="idm46045259663328">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        role_edges
       </code>
       : This table lists edges for
            role subgraphs.
      </p>
      <p>
       A given
       <code class="literal">
        user
       </code>
       table row might refer to a
            user account or a role. The server can distinguish whether a
            row represents a user account, a role, or both by consulting
            the
       <code class="literal">
        role_edges
       </code>
       table for information
            about relations between authentication IDs.
      </p>
      <a class="indexterm" name="idm46045259658192">
      </a>
      <a class="indexterm" name="idm46045259656704">
      </a>
      <a class="indexterm" name="idm46045259655216">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        password_history
       </code>
       : Information about
            password changes.
      </p>
      <a class="indexterm" name="idm46045259652192">
      </a>
      <a class="indexterm" name="idm46045259650704">
      </a>
      <a class="indexterm" name="idm46045259649216">
      </a>
     </li>
    </ul>
   </div>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="system-schema-object-tables">
       </a>
       Object Information System Tables
      </h3>
     </div>
    </div>
   </div>
   <p>
    These system tables contain information about components,
        loadable functions, and server-side plugins:
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <code class="literal">
        component
       </code>
       : The registry for server
            components installed using
       <a class="link" href="install-component.html" title="15.7.4.3 INSTALL COMPONENT Statement">
        <code class="literal">
         INSTALL
            COMPONENT
        </code>
       </a>
       . Any components listed in this table are
            installed by a loader service during the server startup
            sequence. See
       <a class="xref" href="component-loading.html" title="7.5.1 Installing and Uninstalling Components">
        Section 7.5.1, “Installing and Uninstalling Components”
       </a>
       .
      </p>
      <a class="indexterm" name="idm46045259641664">
      </a>
      <a class="indexterm" name="idm46045259640176">
      </a>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        func
       </code>
       : The registry for loadable functions
            installed using
       <a class="link" href="create-function-loadable.html" title="15.7.4.1 CREATE FUNCTION Statement for Loadable Functions">
        <code class="literal">
         CREATE
            FUNCTION
        </code>
       </a>
       . During the normal startup sequence, the
            server loads functions registered in this table. If the
            server is started with the
       <a class="link" href="server-options.html#option_mysqld_skip-grant-tables">
        <code class="option">
         --skip-grant-tables
        </code>
       </a>
       option,
            functions registered in the table are not loaded and are
            unavailable. See
       <a class="xref" href="function-loading.html" title="7.7.1 Installing and Uninstalling Loadable Functions">
        Section 7.7.1, “Installing and Uninstalling Loadable Functions”
       </a>
       .
      </p>
      <a class="indexterm" name="idm46045259633776">
      </a>
      <a class="indexterm" name="idm46045259632288">
      </a>
      <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
       <div class="admon-title">
        Note
       </div>
       <p>
        Like the
        <code class="literal">
         mysql.func
        </code>
        system table, the
              Performance Schema
        <a class="link" href="performance-schema-user-defined-functions-table.html" title="29.12.22.10 The user_defined_functions Table">
         <code class="literal">
          user_defined_functions
         </code>
        </a>
        table
              lists loadable functions installed using
        <a class="link" href="create-function-loadable.html" title="15.7.4.1 CREATE FUNCTION Statement for Loadable Functions">
         <code class="literal">
          CREATE
              FUNCTION
         </code>
        </a>
        . Unlike the
        <code class="literal">
         mysql.func
        </code>
        table, the
        <a class="link" href="performance-schema-user-defined-functions-table.html" title="29.12.22.10 The user_defined_functions Table">
         <code class="literal">
          user_defined_functions
         </code>
        </a>
        table
              also lists functions installed automatically by server
              components or plugins. This difference makes
        <a class="link" href="performance-schema-user-defined-functions-table.html" title="29.12.22.10 The user_defined_functions Table">
         <code class="literal">
          user_defined_functions
         </code>
        </a>
        preferable to
        <code class="literal">
         mysql.func
        </code>
        for checking
              which functions are installed. See
        <a class="xref" href="performance-schema-user-defined-functions-table.html" title="29.12.22.10 The user_defined_functions Table">
         Section 29.12.22.10, “The user_defined_functions Table”
        </a>
        .
       </p>
      </div>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        plugin
       </code>
       : The registry for server-side
            plugins installed using
       <a class="link" href="install-plugin.html" title="15.7.4.4 INSTALL PLUGIN Statement">
        <code class="literal">
         INSTALL
            PLUGIN
        </code>
       </a>
       . During the normal startup sequence, the
            server loads plugins registered in this table. If the server
            is started with the
       <a class="link" href="server-options.html#option_mysqld_skip-grant-tables">
        <code class="option">
         --skip-grant-tables
        </code>
       </a>
       option,
            plugins registered in the table are not loaded and are
            unavailable. See
       <a class="xref" href="plugin-loading.html" title="7.6.1 Installing and Uninstalling Plugins">
        Section 7.6.1, “Installing and Uninstalling Plugins”
       </a>
       .
      </p>
      <a class="indexterm" name="idm46045259616640">
      </a>
      <a class="indexterm" name="idm46045259615152">
      </a>
     </li>
    </ul>
   </div>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="system-schema-log-tables">
       </a>
       Log System Tables
      </h3>
     </div>
    </div>
   </div>
   <p>
    The server uses these system tables for logging:
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <a class="indexterm" name="idm46045259610928">
       </a>
       <a class="indexterm" name="idm46045259609440">
       </a>
       <code class="literal">
        general_log
       </code>
       : The general query log table.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a class="indexterm" name="idm46045259606432">
       </a>
       <a class="indexterm" name="idm46045259604944">
       </a>
       <code class="literal">
        slow_log
       </code>
       : The slow query log table.
      </p>
     </li>
    </ul>
   </div>
   <p>
    Log tables use the
    <code class="literal">
     CSV
    </code>
    storage engine.
   </p>
   <p>
    For more information, see
    <a class="xref" href="server-logs.html" title="7.4 MySQL Server Logs">
     Section 7.4, “MySQL Server Logs”
    </a>
    .
   </p>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="system-schema-help-tables">
       </a>
       Server-Side Help System Tables
      </h3>
     </div>
    </div>
   </div>
   <a class="indexterm" name="idm46045259598944">
   </a>
   <a class="indexterm" name="idm46045259597456">
   </a>
   <p>
    These system tables contain server-side help information:
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <a class="indexterm" name="idm46045259594720">
       </a>
       <a class="indexterm" name="idm46045259593232">
       </a>
       <code class="literal">
        help_category
       </code>
       : Information about help
            categories.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a class="indexterm" name="idm46045259590208">
       </a>
       <a class="indexterm" name="idm46045259588720">
       </a>
       <code class="literal">
        help_keyword
       </code>
       : Keywords associated with
            help topics.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a class="indexterm" name="idm46045259585696">
       </a>
       <a class="indexterm" name="idm46045259584208">
       </a>
       <code class="literal">
        help_relation
       </code>
       : Mappings between help
            keywords and topics.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a class="indexterm" name="idm46045259581184">
       </a>
       <a class="indexterm" name="idm46045259579696">
       </a>
       <code class="literal">
        help_topic
       </code>
       : Help topic contents.
      </p>
     </li>
    </ul>
   </div>
   <p>
    For more information, see
    <a class="xref" href="server-side-help-support.html" title="7.1.17 Server-Side Help Support">
     Section 7.1.17, “Server-Side Help Support”
    </a>
    .
   </p>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="system-schema-time-zone-tables">
       </a>
       Time Zone System Tables
      </h3>
     </div>
    </div>
   </div>
   <a class="indexterm" name="idm46045259574624">
   </a>
   <a class="indexterm" name="idm46045259573136">
   </a>
   <p>
    These system tables contain time zone information:
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <a class="indexterm" name="idm46045259570416">
       </a>
       <a class="indexterm" name="idm46045259568928">
       </a>
       <code class="literal">
        time_zone
       </code>
       : Time zone IDs and whether they
            use leap seconds.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a class="indexterm" name="idm46045259565888">
       </a>
       <a class="indexterm" name="idm46045259564432">
       </a>
       <code class="literal">
        time_zone_leap_second
       </code>
       : When leap seconds
            occur.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a class="indexterm" name="idm46045259561408">
       </a>
       <a class="indexterm" name="idm46045259559920">
       </a>
       <code class="literal">
        time_zone_name
       </code>
       : Mappings between time
            zone IDs and names.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a class="indexterm" name="idm46045259556896">
       </a>
       <a class="indexterm" name="idm46045259555392">
       </a>
       <a class="indexterm" name="idm46045259553888">
       </a>
       <a class="indexterm" name="idm46045259552384">
       </a>
       <code class="literal">
        time_zone_transition
       </code>
       ,
       <code class="literal">
        time_zone_transition_type
       </code>
       : Time zone
            descriptions.
      </p>
     </li>
    </ul>
   </div>
   <p>
    For more information, see
    <a class="xref" href="time-zone-support.html" title="7.1.15 MySQL Server Time Zone Support">
     Section 7.1.15, “MySQL Server Time Zone Support”
    </a>
    .
   </p>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="system-schema-replication-tables">
       </a>
       Replication System Tables
      </h3>
     </div>
    </div>
   </div>
   <p>
    The server uses these system tables to support replication:
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <a class="indexterm" name="idm46045259545376">
       </a>
       <a class="indexterm" name="idm46045259543888">
       </a>
       <code class="literal">
        gtid_executed
       </code>
       : Table for storing GTID
            values. See
       <a class="xref" href="replication-gtids-concepts.html#replication-gtids-gtid-executed-table" title="mysql.gtid_executed Table">
        mysql.gtid_executed Table
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a class="indexterm" name="idm46045259539936">
       </a>
       <a class="indexterm" name="idm46045259538448">
       </a>
       <code class="literal">
        ndb_binlog_index
       </code>
       : Binary log information
            for NDB Cluster replication. This table is created only if
            the server is built with
       <a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
        <code class="literal">
         NDBCLUSTER
        </code>
       </a>
       support. See
       <a class="xref" href="mysql-cluster-replication-schema.html" title="25.7.4 NDB Cluster Replication Schema and Tables">
        Section 25.7.4, “NDB Cluster Replication Schema and Tables”
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a class="indexterm" name="idm46045259532432">
       </a>
       <a class="indexterm" name="idm46045259530944">
       </a>
       <a class="indexterm" name="idm46045259529456">
       </a>
       <a class="indexterm" name="idm46045259528000">
       </a>
       <a class="indexterm" name="idm46045259526496">
       </a>
       <a class="indexterm" name="idm46045259525008">
       </a>
       <code class="literal">
        slave_master_info
       </code>
       ,
       <code class="literal">
        slave_relay_log_info
       </code>
       ,
       <code class="literal">
        slave_worker_info
       </code>
       : Used to store
            replication information on replica servers. See
       <a class="xref" href="replica-logs.html" title="19.2.4 Relay Log and Replication Metadata Repositories">
        Section 19.2.4, “Relay Log and Replication Metadata Repositories”
       </a>
       .
      </p>
     </li>
    </ul>
   </div>
   <p>
    All of the tables just listed use the
    <a class="link" href="innodb-storage-engine.html" title="Chapter 17 The InnoDB Storage Engine">
     <code class="literal">
      InnoDB
     </code>
    </a>
    storage engine.
   </p>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="system-schema-optimizer-tables">
       </a>
       Optimizer System Tables
      </h3>
     </div>
    </div>
   </div>
   <p>
    These system tables are for use by the optimizer:
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <a class="indexterm" name="idm46045259516000">
       </a>
       <a class="indexterm" name="idm46045259514544">
       </a>
       <a class="indexterm" name="idm46045259513040">
       </a>
       <a class="indexterm" name="idm46045259511536">
       </a>
       <code class="literal">
        innodb_index_stats
       </code>
       ,
       <code class="literal">
        innodb_table_stats
       </code>
       : Used for
       <code class="literal">
        InnoDB
       </code>
       persistent optimizer statistics.
            See
       <a class="xref" href="innodb-persistent-stats.html" title="17.8.10.1 Configuring Persistent Optimizer Statistics Parameters">
        Section 17.8.10.1, “Configuring Persistent Optimizer Statistics Parameters”
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a class="indexterm" name="idm46045259506400">
       </a>
       <a class="indexterm" name="idm46045259504912">
       </a>
       <a class="indexterm" name="idm46045259503424">
       </a>
       <a class="indexterm" name="idm46045259501936">
       </a>
       <code class="literal">
        server_cost
       </code>
       ,
       <code class="literal">
        engine_cost
       </code>
       : The optimizer cost model
            uses tables that contain cost estimate information about
            operations that occur during query execution.
       <code class="literal">
        server_cost
       </code>
       contains optimizer cost
            estimates for general server operations.
       <code class="literal">
        engine_cost
       </code>
       contains estimates for
            operations specific to particular storage engines. See
       <a class="xref" href="cost-model.html" title="10.9.5 The Optimizer Cost Model">
        Section 10.9.5, “The Optimizer Cost Model”
       </a>
       .
      </p>
     </li>
    </ul>
   </div>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="system-schema-miscellaneous-tables">
       </a>
       Miscellaneous System Tables
      </h3>
     </div>
    </div>
   </div>
   <p>
    Other system tables do not fit the preceding categories:
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <a class="indexterm" name="idm46045259493504">
       </a>
       <a class="indexterm" name="idm46045259492016">
       </a>
       <a class="indexterm" name="idm46045259490528">
       </a>
       <a class="indexterm" name="idm46045259489040">
       </a>
       <code class="literal">
        audit_log_filter
       </code>
       ,
       <code class="literal">
        audit_log_user
       </code>
       : If MySQL Enterprise Audit is
            installed, these tables provide persistent storage of audit
            log filter definitions and user accounts. See
       <a class="xref" href="audit-log-reference.html#audit-log-tables" title="Audit Log Tables">
        Audit Log Tables
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a class="indexterm" name="idm46045259484400">
       </a>
       <a class="indexterm" name="idm46045259482896">
       </a>
       <a class="indexterm" name="idm46045259481392">
       </a>
       <a class="indexterm" name="idm46045259479904">
       </a>
       <a class="indexterm" name="idm46045259478416">
       </a>
       <a class="indexterm" name="idm46045259476912">
       </a>
       <a class="indexterm" name="idm46045259475408">
       </a>
       <a class="indexterm" name="idm46045259473920">
       </a>
       <a class="indexterm" name="idm46045259472432">
       </a>
       <a class="indexterm" name="idm46045259470928">
       </a>
       <code class="literal">
        firewall_group_allowlist
       </code>
       ,
       <code class="literal">
        firewall_groups
       </code>
       ,
       <code class="literal">
        firewall_memebership
       </code>
       ,
       <code class="literal">
        firewall_users
       </code>
       ,
       <code class="literal">
        firewall_whitelist
       </code>
       : If MySQL Enterprise Firewall is
            installed, these tables provide persistent storage for
            information used by the firewall. See
       <a class="xref" href="firewall.html" title="8.4.7 MySQL Enterprise Firewall">
        Section 8.4.7, “MySQL Enterprise Firewall”
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a class="indexterm" name="idm46045259464224">
       </a>
       <a class="indexterm" name="idm46045259462736">
       </a>
       <code class="literal">
        servers
       </code>
       : Used by the
       <code class="literal">
        FEDERATED
       </code>
       storage engine. See
       <a class="xref" href="federated-create-server.html" title="18.8.2.2 Creating a FEDERATED Table Using CREATE SERVER">
        Section 18.8.2.2, “Creating a FEDERATED Table Using CREATE SERVER”
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a class="indexterm" name="idm46045259458160">
       </a>
       <a class="indexterm" name="idm46045259456656">
       </a>
       <code class="literal">
        innodb_dynamic_metadata
       </code>
       : Used by the
       <code class="literal">
        InnoDB
       </code>
       storage engine to store
            fast-changing table metadata such as auto-increment counter
            values and index tree corruption flags. Replaces the data
            dictionary buffer table that resided in the
       <code class="literal">
        InnoDB
       </code>
       system tablespace.
      </p>
     </li>
    </ul>
   </div>
  </div>
 </div>
 <br/>
</div>
