What are Linux/Windows MySQL Server Installation Directories

Linux MySQL Server Installation Directories

MySQL installation directories in Linux

When the RPM files are unpacked, many files are automatically extracted and placed into different locations. The figure above shows the most common default directory locations and files.

Data Directory

/var/lib/mysqlis is where the server stores databases. This directory is preconfigured and ready to use. For example, this directory includes a mysql subdirectory (contains the grant tables) and a test directory for the test database (can be used for testing purposes). The InnoDB log files and system tablespace are in this directory.

Base Directory

/usr is the base directory. It contains program files and a my.cnf file. When you use mysqld_safeto launch the MySQL Server process (mysqld), it uses the my.cnf file stored in this location. **/usr/bin **contains client programs and scripts such as mysql, my_print_defaults, mysqladmin, mysqlcheck, mysqld_safe, and innochecksum.

Other Directories

/etc and /var/log are standard Linux directories for configuration files and log files. The /etc/my.cnffile is read by the MySQL Server process (mysqld).

Windows MySQL Server Installation Directory

MySQL installation directories in Windows

By default, MySQL 5.6 is installed at the directory path “C:\Program Files\MySQL\MySQL 5.6 Server.

Bin Directory

\bin contains the MySQL server and client programs. Windows MySQL distributions include multiple programs, which can be found in the bin directory:

  • mysqld.exe: Standard server
  • Other client programs, such as mysqladmin.exe

Data Directory

\data is where the server stores databases and log files. This directory is preconfigured and ready to use. For example, this directory includes a mysql subdirectory (contains the grant tables) and the test subdirectory for the test database (can be used for testing purposes).

Configuration File

The my.ini configuration options file specifies where the installation directory is located, as well as other optional settings.