The '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 categories:
*note system-schema-grant-tables::
*note system-schema-object-tables::
*note system-schema-log-tables::
*note system-schema-help-tables::
*note system-schema-time-zone-tables::
*note system-schema-replication-tables::
*note system-schema-optimizer-tables::
*note system-schema-miscellaneous-tables::
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 otherwise indicated.
Warning:
Do not convert MySQL system tables in the 'mysql' database from 'MyISAM' to '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 *note data-directory-initialization::).
Grant System Tables
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.
'tables_priv': Table-level privileges.
'columns_priv': Column-level privileges.
'procs_priv': Stored procedure and function privileges.
'proxies_priv': Proxy-user privileges.
For more information about the structure, contents, and purpose of the grant tables, see *note grant-tables::.
Object Information System Tables
These system tables contain information about stored programs, loadable functions, and server-side plugins:
'event': The registry for Event Scheduler events installed using note 'CREATE EVENT': create-event. If the server is started with the '--skip-grant-tables' option, the event scheduler is disabled and events registered in the table do not run. See note events-configuration::.
'func': The registry for loadable functions installed using note 'CREATE FUNCTION': create-function-loadable. During the normal startup sequence, the server loads functions registered in this table. If the server is started with the '--skip-grant-tables' option, functions registered in the table are not loaded and are unavailable. See note function-loading::.
'plugin': The registry for server-side plugins installed using note 'INSTALL PLUGIN': install-plugin. During the normal startup sequence, the server loads plugins registered in this table. If the server is started with the '--skip-grant-tables' option, plugins registered in the table are not loaded and are unavailable. See note plugin-loading::.
The 'plugin' table uses the 'InnoDB' storage engine as of MySQL 5.7.6, 'MyISAM' before that.
'proc': Information about stored procedures and functions. See *note stored-routines::.
Log System Tables
The server uses these system tables for logging:
'general_log': The general query log table.
'slow_log': The slow query log table.
Log tables use the 'CSV' storage engine.
For more information, see *note server-logs::.
Server-Side Help System Tables
These system tables contain server-side help information:
'help_category': Information about help categories.
'help_keyword': Keywords associated with help topics.
'help_relation': Mappings between help keywords and topics.
'help_topic': Help topic contents.
These tables use the 'InnoDB' storage engine as of MySQL 5.7.5, 'MyISAM' before that.
For more information, see *note server-side-help-support::.
Time Zone System Tables
These system tables contain time zone information:
'time_zone': Time zone IDs and whether they use leap seconds.
'time_zone_leap_second': When leap seconds occur.
'time_zone_name': Mappings between time zone IDs and names.
'time_zone_transition', 'time_zone_transition_type': Time zone descriptions.
These tables use the 'InnoDB' storage engine as of MySQL 5.7.5, 'MyISAM' before that.
For more information, see *note time-zone-support::.
Replication System Tables
The server uses these system tables to support replication:
'gtid_executed': Table for storing GTID values. See *note replication-gtids-gtid-executed-table::.
The 'gtid_executed' table uses the 'InnoDB' storage engine.
'ndb_binlog_index': Binary log information for NDB Cluster replication. See *note mysql-cluster-replication-schema::.
Prior to NDB 7.5.2, this table employed the note 'MyISAM': myisam-storage-engine. storage engine. In NDB 7.5.2 and later, it uses note 'InnoDB': innodb-storage-engine. If you are planning an upgrade from a NDB Cluster previous release to NDB 7.5.2 or later, see *note mysql-cluster-upgrade-downgrade::, for important information relating to this change.
'slave_master_info', 'slave_relay_log_info', 'slave_worker_info': Used to store replication information on replica servers. See *note replica-logs::.
All three of these tables use the 'InnoDB' storage engine.
Optimizer System Tables
These system tables are for use by the optimizer:
'innodb_index_stats', 'innodb_table_stats': Used for 'InnoDB' persistent optimizer statistics. See *note innodb-persistent-stats::.
'server_cost', 'engine_cost': The optimizer cost model uses tables that contain cost estimate information about operations that occur during query execution. 'server_cost' contains optimizer cost estimates for general server operations. 'engine_cost' contains estimates for operations specific to particular storage engines. See *note cost-model::.
These tables use the 'InnoDB' storage engine.
Miscellaneous System Tables
Other system tables do not fall into the preceding categories:
'audit_log_filter', 'audit_log_user': If MySQL Enterprise Audit is installed, these tables provide persistent storage of audit log filter definitions and user accounts. See *note audit-log-tables::.
'firewall_users', 'firewall_whitelist': If MySQL Enterprise Firewall is installed, these tables provide persistent storage for information used by the firewall. See *note firewall::.
'servers': Used by the 'FEDERATED' storage engine. See *note federated-create-server::.
The 'servers' table uses the 'InnoDB' storage engine as of MySQL 5.7.6, 'MyISAM' before that.
File: manual.info.tmp, Node: server-logs, Next: server-plugins, Prev: system-schema, Up: server-administration