2.17. Installing MySQL from Source
Building MySQL from the source code enables you to customize build parameters, compiler
optimizations, and installation location. For a list of systems on which MySQL is known to run, see
Section 2.4.2, "Operating Systems Supported by MySQL Community
Before you proceed with an installation from source, check whether we produce a precompiled binary
distribution for your platform and whether it works for you. We put a great deal of effort into ensuring
that our binaries are built with the best possible options for optimal performance. Instructions for
installing binary distributions are available in
Other Unix-Like
To obtain a source distribution for MySQL, see
source distributions are available as compressed
Distribution files have names of the form mysql-VERSION.tar.gz, mysql-VERSION.zip, or
mysql-VERSION.rpm, where
To perform a MySQL installation using the source code:
• To build MySQL from source on Unix-like systems, including Linux, commercial Unix, BSD, Mac
OS X and others using a
"Installing MySQL from a Standard Source
• To build MySQL from source on Windows (Windows XP or newer required), see
"Installing MySQL from Source on
• For information on building from one of our development trees, see
from a Development Source
• For information on using the
links to platform specific parameters that you might need, see
Configuration
To install MySQL from source, your system must have the following tools:
• GNU
gunzip
.tar.gz
distribution).
GNU
tar
unpack the long file names in the MySQL distribution. You should download and install GNU tar, or
if available, use a preinstalled version of GNU tar. Usually this is available as gnutar, gtar, or as
within a GNU or Free Software directory, such as
tar
is available from http://www.gnu.org/software/tar/.
tar
• A working ANSI C++ compiler. GCC 3.4.6 or later, Sun Studio 10 or later, Visual Studio 2005 or later,
and many current vendor-supplied compilers are known to work.
• A good
make
highly recommended that you use GNU
system as gmake. GNU
•
libtool
If you are using a version of
important that you use this option. Otherwise, you may compile a binary that crashes randomly. Also
Installing MySQL from Source
Note
The accounts that are listed in the MySQL grant tables initially have no
passwords. After starting the server, you should set up passwords for them
using the instructions in
Systems".
VERSION
.tar.gz
Tree".
configure
Options".
to uncompress the distribution and a reasonable
distribution), or
WinZip
is known to work. The standard
program. Although some platforms come with their own
is available from http://www.gnu.org/software/make/.
make
1.5, available from http://www.gnu.org/software/libtool/. 1.5.24 or later is recommended.
recent enough to understand the
gcc
Section 2.18, "Postinstallation Setup and
Section 2.16, "Installing MySQL from Generic Binaries on
Section 2.5, "How to Get
files, Zip archives, or RPM packages.
tar
is a number like 5.0.96.
or RPM-based source code distribution, see
Distribution".
Windows".
command to specify the source build parameters, including
or another tool that can read
provided with some operating systems is not able to
tar
/usr/sfw/bin
3.75 or newer. It may already be available on your
make
109
Testing".
Server".
MySQL". MySQL
Section 2.17.1,
Section 2.10.8,
Section 2.17.2, "Installing MySQL
Section 2.17.3, "MySQL Source-
to unpack it (if you use a
tar
files (if you use a
.zip
or /usr/local/bin. GNU
implementations, it is
make
-fno-exceptions
.zip
option, it is very
Need help?
Do you have a question about the 5.0 and is the answer not in the manual?
Questions and answers