Showing entries 1 to 7
Displaying posts with tag: how to build mysql on windows (reset)
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 …
[Read more]
Building MariaDB 5.1 on Windows Revisited

I previously wrote an article on Building MariaDB 5.1 on Windows, but it was about 1.5 years ago (for 5.1.60; this is for 5.1.67), so I wanted to update this a little since I’ve built it entirely from the command-line this time (as well as highlight a couple problems/solutions – which I’ll cover in a subsequent troubleshooting post). This process it quite similar to my steps for building MariaDB 5.5 and MariaDB 10.0, however it’s slightly different since 5.1 requires you run the configure.js script before running cmake. Aside from that though, things are mostly the same.

Here is the full procedure:

Download 5.1.67 MariaDB source and extract to C:\mysql\mariadb-5.1.67
cd C:\mysql\mariadb-5.1.67
win\configure.js
cmake .
cmake …
[Read more]
Building MySQL and MariaDB on Windows using Visual Studio 2012 Express versus Visual Studio 2010 Express

I mentioned in a recent post (and another recent, related post) I was going to try Visual Studio 2012 Express (as opposed to VS 2010 Express) for building MySQL 5.6 and MariaDB 10.0. on Windows.

I followed the exact same steps, but MySQL 5.6.10 would not build without fatal errors in 2012 (whereas it worked fine with VS 2010). Unfortunately, the fail errors were not too descriptive, so not quite sure what to do yet to fix it. Here is a brief snippet for those interested:

...
Done Building Project "C:\...\bld\sql\udf_example.vcxproj" (default targets).
Done Building Project "C:\...\bld\ALL_BUILD.vcxproj" (default targets) -- FAILED.
Done Building Project "c:\...\bld\package.vcxproj" (default targets) -- FAILED.
...
Build FAILED.
...

"c:\mysql\mysql-5.6.10\bld\package.vcxproj" (default target) (1) -> …
[Read more]
How to Build MySQL 5.6 on Windows from Source Code

I just set up a new Windows 7 machine, and built MySQL 5.6 for the first time, so I wanted to share my steps for anyone interested.

** 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.6.10
mkdir bld
cd bld
cmake ..
cmake --build . --config relwithdebinfo --target package

(You don’t technically need the ‘bld’ dir, but I prefer it to keep the main dir ‘clean’. Then if you need to re-build, you can quickly just delete the whole ‘bld’ directory, and start fresh.)

Here is my actual output …

[Read more]
How to Build MariaDB 10.0 on Windows from Source Code

I just wanted to share my steps for building MariaDB 10.0 on Windows (10.0.1 in this case):

cd maria-10.0.1
mkdir bld
cd bld
cmake .. -G "Visual Studio 10"
cmake --build . --config relwithdebinfo --target package

That’s it! The zip file is created right there in bld/.

Hope this helps.

 

How to Build MariaDB 5.5 on Windows from Source Code

I built MariaDB 5.5.24 on Windows yesterday from source, so I just wanted to share my steps.

Here is the short version:

bzr branch lp:maria/5.5 maria-5.5
cd maria-5.5
mkdir bld
cd bld
cmake .. -G "Visual Studio 10"
cmake --build . --config relwithdebinfo --target package

Done! Nice, neat zip file is created right there.

Here is the longer version with outputs for those interested:

C:\mariadb-5.5>bzr branch lp:maria/5.5 maria-5.5
Connected (version 2.0, client Twisted)
Authentication (publickey) successful!
Secsh channel 1 opened.
Branched 3418 revision(s).

C:\mariadb-5.5>cd maria-5.5

C:\mariadb-5.5\maria-5.5>mkdir bld

C:\mariadb-5.5\maria-5.5>cd bld

C:\mariadb-5.5\maria-5.5\bld>cmake .. -G "Visual Studio 10"
-- 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
-- …
[Read more]
Changing MySQL parser code on Windows – Build breaks due to Bison

In case if you working on Windows environment for MySQL development (sometimes I use visual studio for easy debugging); and in case if you change the parser code (sql_yacc.yy) or if you are working directly from development branch (bzr launchpad), then the build breaks to generate the yacc files (sql_yacc.h and sql_yacc.cc) with an error bison: M4: Invalid argument as shown below:

      1>------ Build started: Project: sql, Configuration: Debug Win32 ------
1>Generating sql_yacc.h, sql_yacc.cc
2>------ Build started: Project: GenServerSource, Configuration: Debug Win32 ------
2>Generating sql_yacc.h, sql_yacc.cc
1>bison: m4: Invalid argument
1>Project : error PRJ0019: A tool returned an error code from "Generating sql_yacc.h, sql_yacc.cc"
1>sql - 1 error(s), 0 warning(s)
2>bison: m4: Invalid argument …
[Read more]
Showing entries 1 to 7