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 geeksww.com "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):
- How to download, compile, and install GNU ncurses on Debian/Ubuntu Linux
- How to download and install Bison (GNU Parser Generator)
- How to download, compile, and install CMake on Linux
- Installing libaio on Linux
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 http://www.morphisms.net/~wkj/download/libaio.tbz $ 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 http://www.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.10.tar.gz/from/http://cdn.mysql.com/ $ 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 $ cmake . -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DMYSQL_DATADIR=/opt/mysql-5.6.10/data/ -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/ -DINSTALL_LAYOUT=STANDALONE -DENABLED_PROFILING=ON -DMYSQL_MAINTAINER_MODE=OFF -DWITH_DEBUG=OFF -DDEFAULT_CHARSET=utf8 -DENABLED_LOCAL_INFILE=TRUE -DWITH_ZLIB=bundled $ 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. Use the icons below to share this tutorial with your friends.
tags cloud
popular searches
free download for mysql database server 5.1.5, php, linux, mysql mysql, mysql, java, install mysql, gearman, ubuntu, tools, source code, bison, mysql initialization, install cairo, laptop
Similar Tutorials:
- How to download and install setuptools module for Python
- Giving Apache Web Server A Different Name by changing Source Code Before Installation (very simple instructions)
- Download, configure, compile, and install MySQL 5.5 from source code on Linux
- How to download, compile, and install Python on Ubuntu/Debian/ CentOS Linux
- How to download, compile, and install GNU ncurses on Debian/Ubuntu Linux
Tutorials in 'Database Management Systems > MySQL' (more):
- Is MySQL 5.6 slower than MySQL 5.5? No, it's faster
- Fast, parallel restore from SQL dumps (mysqldump) for MySQL
- How to download and install MySQL on Mac OS X
- MySQL DATE_FORMAT function and ORDER BY
- MySQL Query Cache not necessarily a bad thing


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