Memo: How to build MySQL

Memorandum for myself.

Install Lubuntu into Netbook(eeePC 1000H) via USB

Lubuntu image

http://lubuntu.net/

Get, build, and test MySQL

Get source code

http://dev.mysql.com/doc/internals/en/getting-source-tree.html

First, I needed to register and set ssh public key.

https://launchpad.net/people/+me/

ssh-keygen -t rsa
# then, copy ~/.ssh/id_rsa.pub to https://launchpad.net/people/+me/
# after that run the following command
bzr launchpad-login <id>

Then got the source code.

bzr init-repo $HOME/mysql-server
cd $HOME/mysql-server
bzr branch lp:mysql-server/5.7 mysql-5.7

"bzr branzh" somehow wasted huge memory, so I increased the memory of VM I worked on as workaround.

How to build

http://dev.mysql.com/doc/internals/en/cmake-howto-quick.html

# first, needed to install some packages
sudo apt-get install g++
sudo apt-get install libncurses5-dev 
sudo apt-get install bison

# then make
cd $HOME/mysql-server/mysql-5.7
mkdir bld
cd bld
# -DDOWNLOAD_BOOST and -DWITH_BOOST were necessary in this mysql-server version.
# And add -DCMAKE_BUILD_TYPE=Debug for debug configuration
cmake .. -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/tmp/boost
make

References

https://dev.mysql.com/doc/internals/en/index.html

Understanding MySQL Internals: Discovering and Improving a Great Database (English Edition)

Understanding MySQL Internals: Discovering and Improving a Great Database (English Edition)

詳解 MySQL

詳解 MySQL