Documentation Home
MySQL 5.5 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 26.9Mb
PDF (A4) - 27.0Mb
PDF (RPM) - 25.4Mb
HTML Download (TGZ) - 6.3Mb
HTML Download (Zip) - 6.4Mb
HTML Download (RPM) - 5.4Mb
Man Pages (TGZ) - 159.9Kb
Man Pages (Zip) - 262.9Kb
Info (Gzip) - 2.6Mb
Info (Zip) - 2.6Mb
Excerpts from this Manual

MySQL 5.5 Reference Manual  /  MySQL Server Administration  /  The mysql System Database

5.3 The mysql System Database

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:

The remainder of this section enumerates the tables in each category, with cross references for additional information. System tables use the MyISAM storage engine.


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 Section 2.10.1, “Initializing the Data Directory”).

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.

  • host: Obsolete.

  • 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 Section 6.2.3, “Grant Tables”.

Object Information System Tables

These system tables contain information about stored programs, user-defined functions, and server-side plugins:

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 Section 5.4, “MySQL 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.

For more information, see Section 5.1.13, “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.

For more information, see Section 5.1.12, “MySQL Server Time Zone Support”.

Replication System Tables

The server uses the ndb_binlog_index system table to store binary log information for NDB Cluster replication. See Section 18.6.4, “NDB Cluster Replication Schema and Tables”.

Miscellaneous System Tables

Other system tables do not fall into the preceding categories: