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.CMake can be downloaded fromhttp://www.cmake.org.
A goodmake program. Although some platforms come with their ownmake implementations, it is highly recommended that you use GNUmake 3.75 or later. It may already be available on your system asgmake. GNUmake is available fromhttp://www.gnu.org/software/make/.
On Unix-like systems, including Linux, you can check your system's version ofmake like this:
$> make --versionGNU Make 4.2.1As of MySQL 8.0.26, MySQL 8.0 source code permits use of C++17 features. To enable the necessary level of C++17 support across all supported platforms, the following minimum compiler versions apply:
Linux: GCC 10 or Clang 5
macOS: XCode 10
Solaris: (MySQL 8.0.40 and earlier) GCC 10; (MySQL 8.0.41 and later) GCC 11.4
Windows: Visual Studio 2019
Building MySQL on Windows requires Windows version 10 or later. (MySQL binaries built on recent versions of Windows can generally be run on older versions.) You can determine the Windows version by executingWMIC.exe os get version in the Windows Command Prompt.
The MySQL C API requires a C++ or C99 compiler to compile.
An SSL library is required for support of encrypted connections, entropy for random number generation, and other encryption-related operations. By default, the build uses the OpenSSL library installed on the host system. To specify the library explicitly, use the
WITH_SSLoption when you invokeCMake. For additional information, seeSection 4.6, “Configuring SSL Library Support”.The Boost C++ libraries are required to build MySQL (but not to use it). MySQL compilation requires a particular Boost version. Typically, that is the current Boost version, but if a specific MySQL source distribution requires a different version, the configuration process stops with a message indicating the Boost version that it requires. To obtain Boost and its installation instructions, visitthe official Boost web site. After Boost is installed, tell the build system where the Boost files are placed according to the value set for the
WITH_BOOSToption when you invoke CMake. For example:cmake . -DWITH_BOOST=/usr/local/boost_version_numberAdjust the path as necessary to match your installation.
Thencurses library.
Sufficient free memory. If you encounter build errors such asinternal 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. For Windows, you can useActiveState Perl. orStrawberry Perl.
To install MySQL from a standard source distribution, one of the following tools is required to unpack the distribution file:
For a
.tar.gzcompressedtar file: GNUgunzipto uncompress the distribution and a reasonabletar to unpack it. If yourtar program supports thezoption, it can both uncompress and unpack the file.GNUtar is known to work. The standardtar provided 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 astar within a GNU or Free Software directory, such as
/usr/sfw/binor/usr/local/bin. GNUtar is available fromhttps://www.gnu.org/software/tar/.For a
.zipZip archive:WinZip or another tool that can read.zipfiles.For an
.rpmRPM package: Therpmbuild program 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.GitHub Help provides instructions for downloading and installing Git on different platforms.
bison 2.1 or later, available fromhttp://www.gnu.org/software/bison/. (Version 1 is no longer supported.) Use the latest version ofbison where possible; if you experience problems, upgrade to a later version, rather than revert to an earlier one.
bison is available fromhttp://www.gnu.org/software/bison/.
bisonfor Windows can be downloaded fromhttp://gnuwin32.sourceforge.net/packages/bison.htm. Download the package labeled“Complete package, excluding sources”. On Windows, the default location forbison is theC:\Program Files\GnuWin32directory. Some utilities may fail to findbison because 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,m4 must be installed in addition tobison.m4 is available fromhttp://www.gnu.org/software/m4/.
If you have to install any programs, modify yourPATH environment variable to include any directories in which the programs are located. SeeSetting Environment Variables.
If you run into problems and need to file a bug report, please use the instructions inHow to Report Bugs or Problems.