User Tools

Site Tools


mysqlfilesdirectories

This is an old revision of the document!


Installed Files and Directories

Linux

Data Directory

On Ubuntu this defaults to /var/lib/mysql
A separate directory will be created for each database, apart from INFORMATION_SCHEMA.
Also stored here by default are …

  • Log Files
  • InnoDB tablespace and log files
  • SSL and RSA certificate and key files
  • The server process ID file

You can display the Data Directory using following command …

mysql> show variable like 'datadir';

Log Files

Option Files

To check location of my.cnf file use …

mysql --help | grep 'my.cnf'

On Ubuntu 18.04 this returns …

/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf

Default options are read from the above files in the order given.

mysqlfilesdirectories.1550588463.txt.gz · Last modified: 2025/03/08 22:23 (external edit)