Before you proceed with an installation from source, first check whether our binary is available 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.
To obtain a source distribution for MySQL, Section 2.1.3, “How to Get MySQL”. If you want to build MySQL from source on Windows, see Section 2.10.6, “Installing MySQL from Source on Windows”.
MySQL source distributions are provided as compressed
tar archives and have names of the form
VERSION is a number like
You need the following tools to build and install MySQL from source:
gunzip to uncompress the distribution.
A reasonable tar to unpack the distribution. GNU tar is known to work. Some operating systems come with a preinstalled version of tar that is known to have problems. For example, the tar provided with early versions of Mac OS X, SunOS 4.x, Solaris 8, Solaris 9, Solaris 10 and OpenSolaris, and HP-UX are known to have problems with long file names. On Mac OS X, you can use the preinstalled gnutar program. On Solaris 10 and OpenSolaris you can use the preinstalled gtar. On other systems with a deficient tar, you should install GNU tar first.
A working ANSI C++ compiler. GCC 3.2 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 program. GNU make is always recommended and is sometimes required. (BSD make fails, and vendor-provided make implementations may fail as well.) If you have problems, use GNU make 3.75 or newer.
libtool 1.5.24 or later is also recommended.
If you are using a version of gcc recent enough
to understand the
-fno-exceptions option, it is
very important that you use this option.
Otherwise, you may compile a binary that crashes randomly. Also
-fno-rtti along with
-fno-exceptions. When in doubt, do the following:
CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors \ -fno-exceptions -fno-rtti" ./configure \ --prefix=/usr/local/mysql --enable-assembler \ --with-mysqld-ldflags=-all-static
On most systems, this gives you a fast and stable binary.
If you run into problems and need to file a bug report, please use the instructions in Section 1.7, “How to Report Bugs or Problems”.