Mastering MySQL 4

MySQL is an open-source development, which means the source code is available to anyone who wants it for free. Operating systems such as Linux and FreeBSD are also open source, but Windows is proprietary software, meaning the source code is owned and controlled by Microsoft. Because the MySQL source code is available, you have two ways to install MySQL:

Installing a binary is usually the easiest and quickest way to install MySQL, but the choice depends on a number of factors, as well as how comfortable you are with compiling software. Windows users rarely need to do this, but FreeBSD users, for example, may find themselves doing this quite often. There are a number of reasons you may want to install from source:

Tables 15.1 and 15.2 provide overviews of the directories in a default binary and source installation, respectively.

Table 15.1: Directories of a Binary Installation

Directory

Description

bin

This is where the binary executables are found, including the all-important mysqld, as well as all the utilities such as mysqladmin, mysqlcheck, and mysqldump.

data

The actual databases, as well as log files.

include

The C header files.

lib

The compiled libraries.

scripts

This contains the mysql_install_db script.

share/mysql

A directory for each language containing files with the error messages for that specific language.

sql-bench

Benchmark results and utilities.

Table 15.2: Directories of a Source Installation

Directory

Description

bin

This is where the binary executables for the client programs and utilities are found, such as mysqladmin, mysqlcheck, and mysqldump.

include

The C header files.

info

Documentation files in Info format.

lib

The compiled libraries.

libexec

The mysqld server goes here, not in the bin directory, in a default source installation.

share/mysql

A directory for each language containing files with the error messages for that specific language.

sql-bench

Benchmark results and utilities.

var

The actual databases, as well as log files.

Категории