|
|
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 from binary, which means you use a distribution that has already been compiled by the MySQL developers (or another party)
Installing from source, which means you compile the MySQL source code yourself and install it
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:
The system you are installing on does not have a binary distribution. Binary distributions were available for Linux, FreeBSD, Windows, Solaris, MacOS X, HP-UX, AIX, SCO, SGI Irix, Dec OSF, and BSDi at the time of writing, although not all of these had distributions for the latest version of MySQL.
You think you can better optimize MySQL by using a different compiler or different compilation options.
You want something that is not available in a binary distribution, such as additional character sets, a bug fix, or a different configuration.
Tables 15.1 and 15.2 provide overviews of the directories in a default binary and source installation, respectively.
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. |
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. |
|
|