How to Build MySQL 5.7 on Windows from Source Code

I just installed 5.7.1 on Windows and next up was to build it from source on Windows, so that’s what I did, and thought I’d share the steps.

** Prerequisites **

1. Install Microsoft Visual Studio (I installed VS 2010 Express – free)
2. Install cmake
3. Install bison (make sure no spaces in path)

** Build Instructions **

cd c:\mysql\mysql-5.7.1
mkdir bld
cd bld
cmake ..
cmake --build . --config relwithdebinfo --target package

And here is the full output for anyone who might be interested:

C:\Windows\system32>cd C:\mysql\mysql-5.7.1

C:\mysql\mysql-5.7.1>mkdir bld

C:\mysql\mysql-5.7.1>cd bld

C:\mysql\mysql-5.7.1\bld>cmake ..
-- Building for: Visual Studio 10
-- Running cmake version 2.8.11.1
-- Configuring with MAX_INDEXES = 64U
-- The C compiler identification is MSVC 16.0.30319.1
-- The CXX compiler identification is MSVC 16.0.30319.1
-- Check for working C compiler using: Visual Studio 10
-- Check for working C compiler using: Visual Studio 10 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 10
-- Check for working CXX compiler using: Visual Studio 10 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check size of void *
-- Check size of void * - done
-- MySQL 5.7.1-m11
-- Packaging as: mysql-5.7.1-m11-win32
-- Found Threads: TRUE
-- Looking for ntohll
-- Looking for ntohll - not found
-- Looking for inet_ntop
-- Looking for inet_ntop - not found
-- Check size of time_t
-- Check size of time_t - done
-- Performing Test TIME_T_UNSIGNED
-- Performing Test TIME_T_UNSIGNED - Failed
-- Looking for GetCurrentProcessorNumber
-- Looking for GetCurrentProcessorNumber - not found
-- Using cmake version 2.8.11.1
-- Not building NDB
-- Library mysqlclient depends on OSLIBS ws2_32;Secur32
-- Googlemock was not found. gtest-based unit tests will be disabled.
   You can run cmake . -DENABLE_DOWNLOADS=1 to automatically download
   and build required components from source.
-- If you are inside a firewall, you may need to use an http proxy:
   export http_proxy=http://foo.bar.com:80
-- Library mysqlserver depends on OSLIBS ws2_32
-- mysql-test/include/max_indexes.inc adjusted
-- Cannot find wix 3, installer project will not be generated
-- Configuring done
-- Generating done
-- Build files have been written to: C:/mysql/mysql-5.7.1/bld

C:\mysql\mysql-5.7.1\bld>cmake --build . --config relwithdebinfo --target package
.....
..... tons of output .....
.....

    399 Warning(s)
    0 Error(s)

Time Elapsed 00:17:13.65

C:\mysql\mysql-5.7.1\bld>

Done!!!

mysql-5.7.1-m11-win32.zip created in C:\mysql\mysql-5.7.1\bld

Hope this helps. :)

 

Related Build Links:

 

Tags: , , , , , , , , , , , ,

Comments are closed.


Period Panties by Period Panteez Menstrual Underwear Menstruation PMS Panty