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.
On Windows, the default installation directory is
C:\mysql. With MySQL version 4.1.5 and
higher, this has changed to C:\Program
Files\MySQL\MySQL Server 4.1, where 4.1 is the major
version of the installation. The folder has the following
subdirectories:
Table 2.1. MySQL Installation Layout for Windows
| Directory | Contents of Directory |
|---|---|
bin | Client programs and the mysqld server |
data | Log files, databases |
examples | Example programs and scripts |
include | Include (header) files |
lib | Libraries |
scripts | Utility scripts |
share | Error message and character set files |
Installations created from our Linux RPM distributions result in files under the following system directories:
Table 2.2. MySQL Installation Layout for Linux RPM
| Directory | Contents of Directory |
|---|---|
/usr/bin | Client programs and scripts |
/usr/sbin | The mysqld server |
/var/lib/mysql | Log files, databases |
/usr/share/info | Manual in Info format |
/usr/share/man | Unix manual pages |
/usr/include/mysql | Include (header) files |
/usr/lib/mysql | Libraries |
/usr/share/mysql | Error message and character set files |
/usr/share/sql-bench | Benchmarks |
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.3. MySQL Installation Layout for Generic Unix/Linux Binary Package
| Directory | Contents of Directory |
|---|---|
bin | Client programs and the mysqld server |
data | Log files, databases |
docs | Manual in Info format |
man | Unix manual pages |
include | Include (header) files |
lib | Libraries |
scripts | mysql_install_db |
share/mysql | Error message and character set files |
sql-bench | Benchmarks |
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.9.3, “MySQL Source-Configuration Options”.
Table 2.4. MySQL Layout for Installation from Source
| Directory | Contents of Directory |
|---|---|
bin | Client programs and scripts |
include/mysql | Include (header) files |
Docs | Manual in Info format |
man | Unix manual pages |
lib/mysql | Libraries |
libexec | The mysqld server |
share/mysql | Error message and character set files |
sql-bench | Benchmarks |
var | Log files, databases |
Within its installation directory, the layout of a source installation differs from that of a binary installation in the following ways:
The mysqld server is installed in the
libexec directory rather than in the
bin directory.
The data directory is var rather than
data.
mysql_install_db is installed in the
bin directory rather than in the
scripts directory.
The header file and library directories are
include/mysql and
lib/mysql rather than
include and lib.
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.

User Comments
Add your own comment.