mysql database is the system database. It
contains tables that store information required by the MySQL
server as it runs.
Tables in the
mysql database fall into these
The remainder of this section enumerates the tables in each
category, with cross references for additional information. System
tables use the
MyISAM storage engine unless
Do not convert MySQL system tables in the
mysql database from
InnoDB tables. This is an unsupported
operation. If you do this, MySQL does not restart until you
restore the old system tables from a backup or regenerate them
by reinitializing the data directory (see
Section 2.10.1, “Initializing the Data Directory”).
These system tables contain grant information about user accounts and the privileges held by them:
user: User accounts, global privileges, and other nonprivilege columns.
db: Database-level privileges.
host: Obsolete. MySQL install operations do not create this table as of MySQL 5.6.7.
tables_priv: Table-level privileges.
columns_priv: Column-level privileges.
proxies_priv: Proxy-user privileges.
For more information about the structure, contents, and purpose of the grant tables, see Section 6.2.3, “Grant Tables”.
These system tables contain information about stored programs, user-defined functions, and server-side plugins:
event: The registry for Event Scheduler events installed using
CREATE EVENT. If the server is started with the
--skip-grant-tablesoption, the event scheduler is disabled and events registered in the table do not run. See Section 20.4.2, “Event Scheduler Configuration”.
func: The registry for user-defined functions (UDFs) installed using
CREATE FUNCTION. During the normal startup sequence, the server loads UDFs registered in this table. If the server is started with the
--skip-grant-tablesoption, UDFs registered in the table are not loaded and are unavailable. See Section 5.6.1, “Installing and Uninstalling User-Defined Functions”.
plugin: The registry for server-side plugins installed using
INSTALL PLUGIN. During the normal startup sequence, the server loads plugins registered in this table. If the server is started with the
--skip-grant-tablesoption, plugins registered in the table are not loaded and are unavailable. See Section 5.5.1, “Installing and Uninstalling Plugins”.
proc: Information about stored procedures and functions. See Section 20.2, “Using Stored Routines”.
The server uses these system tables for logging:
Log tables use the
CSV storage engine.
For more information, see Section 5.4, “MySQL Server Logs”.
These system tables contain server-side help information:
For more information, see Section 5.1.14, “Server-Side Help Support”.
These system tables contain time zone information:
For more information, see Section 5.1.13, “MySQL Server Time Zone Support”.
The server uses these system tables to support replication:
ndb_binlog_index: Binary log information for NDB Cluster replication. See Section 18.6.4, “NDB Cluster Replication Schema and Tables”.
slave_worker_info: Used to store replication information on replica servers. See Section 17.2.2, “Relay Log and Replication Metadata Repositories”.
These tables use the
InnoDBstorage engine as of MySQL 5.6.6,
innodb_table_stats system tables are used for
InnoDB persistent optimizer statistics. See
Section 188.8.131.52, “Configuring Persistent Optimizer Statistics Parameters”.
These tables use the
InnoDB storage engine.
Other system tables do not fall into the preceding categories:
firewall_whitelist: If MySQL Enterprise Firewall is installed, these tables provide persistent storage for information used by the firewall. See Section 6.4.5, “MySQL Enterprise Firewall”.
servers: Used by the
FEDERATEDstorage engine. See Section 184.108.40.206, “Creating a FEDERATED Table Using CREATE SERVER”.