Pre-General Availability Draft: 2017-11-22
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:
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:
mysqldirectory corresponds to the
mysqlsystem database, which contains information required by the MySQL server as it runs. This database contains data dictionary tables and system tables. See Section 5.3, “The mysql System Database”.
performance_schemadirectory corresponds to the Performance Schema, which provides information used to inspect the internal execution of the server at runtime. See Chapter 26, MySQL Performance Schema.
sysdirectory corresponds to the
sysschema, which provides a set of objects to help interpret Performance Schema information more easily. See Chapter 27, MySQL sys Schema.
Other subdirectories correspond to databases created by users or applications.Note
INFORMATION_SCHEMAis a standard database, but its implementation uses no corresponding database directory.
Log files written by the server. See Section 5.4, “MySQL Server Logs”.
InnoDBtablespace and log files. See Chapter 15, The InnoDB Storage Engine.
Default/autogenerated SSL and RSA certificate and key files. See Section 6.4.3, “Creating SSL and RSA Certificates and Keys”.
The server process ID file (while the server is running).
mysqld-auto.cnffile that stores persisted global system variable settings. See Section 5.1.6, “Using System Variables”.
Some items in the preceding list can be relocated elsewhere by
reconfiguring the server. In addition, the
--datadir 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.