Download, configure, compile, and install MySQL 5.6

MySQL 5.6 is the latest production-ready release of the most popular open source database management system on the planet ie. MySQL.

In this tutorial, I am going to tell you how to download, configure (for installation purposes only), compile, and install MySQL 5.6 (more specifically 5.6.10) from source code on a Linux machine. You can read my other tutorials on "Install MySQL Server 5.0 and 5.1 from source code" and "Install MySQL Server 5.5 from source code" for previous versions of MySQL server. Please prepare yourself to install several libraries on the server before installing MySQL 5.6. Luckily, I have already written about their installation process in my previous tutorials.

Please make sure you check the downloaded file's integrity before unzipping it. '#' (w/o quotes) in front of commands below means you have to run the commands as root user (or use sudo ).

Here are the libraries and softwares you need to install alongwith their installation tutorials (some tutorials are outdated ie. they are for older versions of libraries, so try finding the latest stable releases for all software systems and libraries before installing). In any case, you should try using properly tested binaries that come with your OS distribution (recommended for production):

Installing libaio on Linux:

InnoDB Plugin 1.1 (default since MySQL 5.5) now uses asynchronous I/O on Linux systems. This change introduces a dependency on libaio.

$ cd /opt
$ wget
$ bunzip2 libaio.tbz
$ tar xf libaio.tar

After installing all these software, let's begin with the actual server installation process.

Download and extract MySQL 5.6.10:

Please make sure you check file's integrity after downloading (before installing).

$ wget
$ tar xzf mysql-5.6.10.tar.gz
$ cd mysql-5.6.10

Configure and compile MySQL 5.6.10:

Please make sure you replace path locations according to your environment in commands below (if you are following my earlier tutorials for installation of required libraries then it is quite possible that you installed them under /usr/local/, if so please adjust the path in command below):

$ PATH=$PATH:/opt/bison/bin   #bison binary should be in your path

-DCMAKE_INSTALL_PREFIX=/opt/mysql-5.6.10 -DCURSES_LIBRARY=/opt/ncurses/lib/libncurses.a 
-DCURSES_INCLUDE_PATH=/opt/ncurses/include/ -DHAVE_LIBAIO_H=/opt/libaio/include/ 

$ make

Install MySQL 5.6.10:

# make install

You can initialize the server you just installed by using the instructions explained in Initializing MySQL database after installation.

Please feel free to use the comments form below if you have any questions or need more explanation on anything. I recommend thoroughy testing on a production-like test system first before moving to production. Use the icons below to share this tutorial with your friends.

tags cloud icon tags cloud

source-code mysql5.6 linux compile install download

popular searches icon popular searches

Comments (write a comment):

Installation of MySQL 5.6.10 is giving a lot of trouble on my Ubuntu 12.10.

"CMake Error: The source directory "~/Downloads/mysql-5.6.10" does not appear to contain CMakeLists.txt."

After going through lot of tutorials, all in vain; I came across your tut here, and felt a little relief. I installed all the prerequisites given here, all as advised. But this too didn't work for me. It is giving the same error. Even I tried the x64 version but not of much use, except a lot of time waste on my slow internet speeds.

Please help me find a solution sooner.
Thank you in advance. Posted by: vikas on Mar 05, 2013

As of today, the latest source is 5.6.15 and can be downloaded with

wget Posted by: Dimitry on Jan 20, 2014

All gone well up to the last command 'make' under your heading 'Configure and compile MySQL 5.6.10:' - 'make' exits with the following mesasge

mysql-5.6.10/cmd-line-utils/libedit/terminal.c:1677: error: expected â{â at end of input
make[2]: *** [cmd-line-utils/libedit/CMakeFiles/edit.dir/terminal.c.o] Error 1
make[1]: *** [cmd-line-utils/libedit/CMakeFiles/edit.dir/all] Error 2
make: *** [all] Error 2

Have put more than 3 days on it so far but still don't know what is the cause. Regards AH Posted by: Abb on Mar 21, 2014

@Abb: not sure what it is, did you check file's integrity after downloading it?

see for some inspiration on how to use checksums Posted by: shahryar on Apr 08, 2014

leave a comment on tutorial leave a comment

overstate navright_over right left overstate