<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h2 class="title">
      <a name="data-directory">
      </a>
      7.2 The MySQL Data Directory
     </h2>
    </div>
   </div>
  </div>
  <p>
   Information managed by the MySQL server is stored under a
      directory known as the data directory. The following list briefly
      describes the items typically found in the data directory, with
      cross references for additional information:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      Data directory subdirectories. Each subdirectory of the data
          directory is a database directory and corresponds to a
          database managed by the server. All MySQL installations have
          certain standard databases:
     </p>
     <div class="itemizedlist">
      <ul class="itemizedlist" style="list-style-type: circle; ">
       <li class="listitem">
        <p>
         The
         <code class="literal">
          mysql
         </code>
         directory corresponds to the
         <code class="literal">
          mysql
         </code>
         system schema, which contains
              information required by the MySQL server as it runs. This
              database contains data dictionary tables and system
              tables. See
         <a class="xref" href="system-schema.html" title="7.3 The mysql System Schema">
          Section 7.3, “The mysql System Schema”
         </a>
         .
        </p>
       </li>
       <li class="listitem">
        <p>
         The
         <code class="literal">
          performance_schema
         </code>
         directory
              corresponds to the Performance Schema, which provides
              information used to inspect the internal execution of the
              server at runtime. See
         <a class="xref" href="performance-schema.html" title="Chapter 29 MySQL Performance Schema">
          Chapter 29,
          <i>
           MySQL Performance Schema
          </i>
         </a>
         .
        </p>
       </li>
       <li class="listitem">
        <p>
         The
         <code class="literal">
          sys
         </code>
         directory corresponds to the
         <code class="literal">
          sys
         </code>
         schema, which provides a set of
              objects to help interpret Performance Schema information
              more easily. See
         <a class="xref" href="sys-schema.html" title="Chapter 30 MySQL sys Schema">
          Chapter 30,
          <i>
           MySQL sys Schema
          </i>
         </a>
         .
        </p>
       </li>
       <li class="listitem">
        <p>
         The
         <code class="literal">
          ndbinfo
         </code>
         directory corresponds to
              the
         <code class="literal">
          ndbinfo
         </code>
         database that stores
              information specific to NDB Cluster (present only for
              installations built to include NDB Cluster). See
         <a class="xref" href="mysql-cluster-ndbinfo.html" title="25.6.17 ndbinfo: The NDB Cluster Information Database">
          Section 25.6.17, “ndbinfo: The NDB Cluster Information Database”
         </a>
         .
        </p>
       </li>
      </ul>
     </div>
     <p>
      Other subdirectories correspond to databases created by users
          or applications.
     </p>
     <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
      <div class="admon-title">
       Note
      </div>
      <p>
       <a class="link" href="information-schema.html" title="Chapter 28 INFORMATION_SCHEMA Tables">
        <code class="literal">
         INFORMATION_SCHEMA
        </code>
       </a>
       is a
            standard database, but its implementation uses no
            corresponding database directory.
      </p>
     </div>
    </li>
    <li class="listitem">
     <p>
      Log files written by the server. See
      <a class="xref" href="server-logs.html" title="7.4 MySQL Server Logs">
       Section 7.4, “MySQL Server Logs”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       InnoDB
      </code>
      tablespace and log files. See
      <a class="xref" href="innodb-storage-engine.html" title="Chapter 17 The InnoDB Storage Engine">
       Chapter 17,
       <i>
        The InnoDB Storage Engine
       </i>
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      Default/autogenerated SSL and RSA certificate and key files.
          See
      <a class="xref" href="creating-ssl-rsa-files.html" title="8.3.3 Creating SSL and RSA Certificates and Keys">
       Section 8.3.3, “Creating SSL and RSA Certificates and Keys”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      The server process ID file (while the server is running).
     </p>
    </li>
    <li class="listitem">
     <p>
      The
      <code class="filename">
       mysqld-auto.cnf
      </code>
      file that stores
          persisted global system variable settings. See
      <a class="xref" href="set-variable.html" title="15.7.6.1 SET Syntax for Variable Assignment">
       Section 15.7.6.1, “SET Syntax for Variable Assignment”
      </a>
      .
     </p>
    </li>
   </ul>
  </div>
  <p>
   Some items in the preceding list can be relocated elsewhere by
      reconfiguring the server. In addition, the
   <a class="link" href="server-system-variables.html#sysvar_datadir">
    <code class="option">
     --datadir
    </code>
   </a>
   option enables the
      location of the data directory itself to be changed. For a given
      MySQL installation, check the server configuration to determine
      whether items have been moved.
  </p>
 </div>
 <br/>
</div>
