Mysql – Can’t find source code for building thesql

installationMySQLsource code

I'm trying to follow the instructions for building MySQL from source. They guide me to a link where I can download the latest GA. I end up at the downloads page, where I can download mysql-5.6.19-osx10.7-x86_64.tar.gz for my mac, and then untar and unzip.

All good so far. But when I try to cmake . per the instructions, I get an error saying that it can't find CMakeLists.txt. Poking around looking for that, I've discovered that the download doesn't come with any actual source code except .h files. In fact, the download looks like an already-built setup with binaries such as mysqld already there.

I am probably missing something obvious, but I can't figure out where I'm supposed to get the full source code and the makefile, if not from the links provided under the title, "Installing MySQL Using a Standard Source Distribution". Anyone have an idea?

Best Answer

Funny - I'm just doing this myself now (assuming Linux (as per Alex Kuzminsky - I use Xubuntu - no heavy GUI desktop).

Get the source (all source downloads here (select from dropdown), Linux source here).

Run (depends on your Linux distro)

sudo apt-get install cmake
sudo apt-get install bison flex
sudo apt-get install libaio1
sudo apt-get install g++ (Ooops!)
sudo apt-get install libncurses5-dev

This was all I needed to do after a fresh (Oracle Virtual Box) install of Xubuntu 14.04 LTS.

Then, what I do is follow the instructions here.

Create a directory "sandbox" beside mysql-5.6.16.

cmake ../mysql-5.6.19
make
make package 

then install the mysql-5.6.19-linux_64.tar.gz package (or whatever it's called)

Works nicely for those of use who want to control things and even run several MySQL servers on the same machine using different ports for example.