Installation of MySQL from source requires several development tools. Some of these tools are needed no matter whether you use a standard source distribution or a development source tree. Other tool requirements depend on which installation method you use.
To install MySQL from source, the following system requirements must be satisfied, regardless of installation method:
CMake, which is used as the build framework on all platforms.CMakecan be downloaded fromhttp://www.cmake.org.
A goodmakeprogram. Although some platforms come with their ownmakeimplementations, it is highly recommended that you use GNUmake3.75 or higher. It may already be available on your system asgmake. GNUmakeis available fromhttp://www.gnu.org/software/make/.
A working ANSI C++ compiler. See the description of the
FORCE_UNSUPPORTED_COMPILER
. option for some guidelines.An SSL library is required for support of encrypted connections, entropy for random number generation, and other encryption-related operations. To specify the library explicitly, use the
WITH_SSL
option when you invokeCMake. For additional information, seeSection 2.9.6, “Configuring SSL Library Support”.The Boost C++ libraries are required to build MySQL (but not to use it). Boost 1.59.0 must be installed. To obtain Boost and its installation instructions, visitthe official site. After Boost is installed, tell the build system where the Boost files are located by defining the
WITH_BOOST
option when you invokeCMake. For example:cmake . -DWITH_BOOST=/usr/local/boost_1_59_0
Adjust the path as necessary to match your installation.
Thencurseslibrary.
Sufficient free memory. If you encounter problems such as“internal compiler error”when compiling large source files, it may be that you have too little memory. If compiling on a virtual machine, try increasing the memory allocation.
Perl is needed if you intend to run test scripts. Most Unix-like systems include Perl. On Windows, you can use a version such as ActiveState Perl.
To install MySQL from a standard source distribution, one of the following tools is required to unpack the distribution file:
For a
.tar.gz
compressedtarfile: GNUgunzip
to uncompress the distribution and a reasonabletarto unpack it. If yourtarprogram supports thez
option, it can both uncompress and unpack the file.GNUtaris known to work. The standardtarprovided with some operating systems is not able to unpack the long file names in the MySQL distribution. You should download and install GNUtar, or if available, use a preinstalled version of GNU tar. Usually this is available asgnutar,gtar, or astarwithin a GNU or Free Software directory, such as
/usr/sfw/bin
或/usr/local/bin
. GNUtaris available fromhttp://www.gnu.org/software/tar/.For a
.zip
Zip archive:WinZip或another tool that can read.zip
files.For an
.rpm
RPM package: Therpmbuildprogram used to build the distribution unpacks it.
To install MySQL from a development source tree, the following additional tools are required:
The Git revision control system is required to obtain the development source code. TheGitHub Helpprovides instructions for downloading and installing Git on different platforms. MySQL officially joined GitHub in September, 2014. For more information about MySQL's move to GitHub, refer to the announcement on the MySQL Release Engineering blog:MySQL on GitHub
bison2.1 or higher, available fromhttp://www.gnu.org/software/bison/. (Version 1 is no longer supported.) Use the latest version ofbisonwhere possible; if you experience problems, upgrade to a later version, rather than revert to an earlier one.
bisonis available fromhttp://www.gnu.org/software/bison/.
bison
for Windows can be downloaded fromhttp://gnuwin32.sourceforge.net/packages/bison.htm. Download the package labeled“Complete package, excluding sources”. On Windows, the default location forbisonis theC:\Program Files\GnuWin32
directory. Some utilities may fail to findbisonbecause of the space in the directory name. Also, Visual Studio may simply hang if there are spaces in the path. You can resolve these problems by installing into a directory that does not contain a space (for exampleC:\GnuWin32
).On Solaris Express,m4must be installed in addition tobison.m4is available fromhttp://www.gnu.org/software/m4/.
If you have to install any programs, modify your路径
environment variable to include any directories in which the programs are located. SeeSection 4.2.7, “Setting Environment Variables”.
If you run into problems and need to file a bug report, please use the instructions inSection 1.6, “How to Report Bugs or Problems”.