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?

  • 3
    you've downloaded compiled binaries for MacOS. What you need is dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.19.tar.gz
    – akuzminsky
    Commented Jul 13, 2014 at 21:15
  • @akuzminsky Thanks so much! Just for my own enlightenment, how could I have known to go there? Am I totally reading the wrong instructions, or is it that the instructions are faulty? Commented Jul 14, 2014 at 4:18
  • When you go to dev.mysql.com/downloads/mysql it detects your MacOS and suggests you to download the binaries for MacOS. But as long as you want to compile MySQL from the source code you need to select "Source Code" in the drop-down list and then download archive "Generic Linux"
    – akuzminsky
    Commented Jul 14, 2014 at 14:39
  • However I must note if there is no good reason to compile MySQL from the source it's better to use binaries.
    – akuzminsky
    Commented Jul 14, 2014 at 14:41
  • @akuzminsky Again, thanks! I saw "Mac OS X" in the dropdown and didn't look any further, haha. Commented Jul 14, 2014 at 14:50

1 Answer 1


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 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.