These instructions describe how to build binaries from source for MySQL 5.0 on Windows. Instructions are provided for building binaries from a standard source distribution or from the Bazaar tree that contains the latest development source.
The instructions here are strictly for users who want to test MySQL on Microsoft Windows from the latest source distribution or from the Bazaar tree. For production use, we do not advise using a MySQL server built by yourself from source. Normally, it is best to use precompiled binary distributions of MySQL that are built specifically for optimal performance on Windows by Oracle Corporation. Instructions for installing binary distributions are available in Chapter 1, Installing MySQL on Microsoft Windows.
To build MySQL on Windows from source, you must satisfy the following system, compiler, and resource requirements:
Windows 2000, Windows XP, or newer version.
Windows Vista is supported when using Visual Studio 2005 provided you have installed the following updates:
To build from the standard source distribution, you will need
CMake, which can be downloaded from
http://www.cmake.org. After installing, modify
PATH environment variable to include
the directory where
cmake is located.
Microsoft Visual C++ 2005 Express Edition, Visual Studio .Net 2003 (7.1), or Visual Studio 2005 (8.0) compiler system.
If you are using Visual C++ 2005 Express Edition, you must also install an appropriate Platform SDK. More information and links to downloads for various Windows platforms is available from http://www.microsoft.com/downloads/details.aspx?familyid=0baf2b35-c656-4969-ace8-e4c0c0716adb.
If you are compiling from a Bazaar tree or making changes to
the parser, you need
bison for Windows,
which can be downloaded from
Download the package labeled “Complete package,
excluding sources”. After installing the package,
PATH environment variable to
include the directory where bison is
Cygwin might be necessary if you want to run the test script or package the compiled binaries and support files into a Zip archive. (Cygwin is needed only to test or package the distribution, not to build it.) Cygwin is available from http://cygwin.com.
3GB to 5GB of disk space.
There are three solutions available for building from the source code on Windows:
Build from the standard MySQL source distribution. For this you will need CMake and Visual C++ Express Edition or Visual Studio. Using this method you can select the storage engines that are included in your build. To use this method, see Section 1.8.1, “Building MySQL from the Standard Source Distribution”.
Build from the MySQL Windows source distribution. The Windows
source distribution includes ready-made Visual Studio solution
files that enable support for all storage engines (except
NDB). To build using using method
you only need Visual C++ Express Edition or Visual Studio. To
use this method, see
Section 1.8.2, “Building MySQL from a Windows Source Distribution”.
Build directly from the Bazaar source repository. For this you
will need CMake, Visual C++ Express Edition
or Visual Studio, and
bison. For this
method you need to create the distribution on a Unix system
and then copy the generated files to your Windows build
environment. To use this method, see
Section 1.8.5, “Creating a Windows Source Package from the Bazaar Repository”.
If you find something not working as expected, or you have
suggestions about ways to improve the current build process on
Windows, please send a message to the
mailing list. See MySQL Mailing Lists.