2.7 Installation Layouts

This section describes the default layout of the directories created by installing binary or source distributions provided by Oracle Corporation. A distribution provided by another vendor might use a layout different from those shown here.

For MySQL 5.0 on Windows, the default installation directory is C:\Program Files\MySQL\MySQL Server 5.0. (Some Windows users prefer to install in C:\mysql, the directory that formerly was used as the default. However, the layout of the subdirectories remains the same.) The installation directory has the following subdirectories:

Table 2.3 MySQL Installation Layout for Windows

DirectoryContents of Directory
binClient programs and the mysqld server
dataLog files, databases
examplesExample programs and scripts
includeInclude (header) files
libLibraries
scriptsUtility scripts
shareMiscellaneous support files, including error messages, character set files, sample configuration files, SQL for database installation

Installations created from our Linux RPM distributions result in files under the system directories shown in the following table.

Table 2.4 MySQL Installation Layout for Linux RPM Packages

DirectoryContents of Directory
/usr/binClient programs and scripts
/usr/sbinThe mysqld server
/var/lib/mysqlLog files, databases
/usr/share/infoManual in Info format
/usr/share/manUnix man pages
/usr/include/mysqlInclude (header) files
/usr/lib/mysqlLibraries
/usr/share/mysqlMiscellaneous support files, including error messages, character set files, sample configuration files, SQL for database installation
/usr/share/sql-benchBenchmarks

On Unix, a tar file binary distribution is installed by unpacking it at the installation location you choose (typically /usr/local/mysql) and creates the following directories in that location:

Table 2.5 MySQL Installation Layout for Generic Unix/Linux Binary Package

DirectoryContents of Directory
binClient programs and the mysqld server
dataLog files, databases
docsManual in Info format
manUnix manual pages
includeInclude (header) files
libLibraries
scriptsmysql_install_db
share/mysqlMiscellaneous support files, including error messages, character set files, sample configuration files, SQL for database installation
sql-benchBenchmarks

By default, when you install MySQL after compiling it from a source distribution, the installation step installs files under /usr/local. Components are installed in the directories shown in the following table. To configure particular installation locations, use the options described at Section 2.17.3, “MySQL Source-Configuration Options”.

Table 2.6 MySQL Layout for Installation from Source

DirectoryContents of Directory
binClient programs and scripts
include/mysqlInclude (header) files
DocsManual in Info format
manUnix manual pages
lib/mysqlLibraries
libexecThe mysqld server
share/mysqlMiscellaneous support files, including error messages, character set files, sample configuration files, SQL for database installation
sql-benchBenchmarks
varLog files, databases

Within its installation directory, the layout of a source installation differs from that of a binary installation in the following ways:

To create your own binary installation from a compiled source distribution, execute the scripts/make_binary_distribution script from the top directory of the source distribution.