MySQL Internals Manual MySQL Source Code Documentation
My reading is based on mysql server version 8.0.0.
Caveat: MySQL build depends on boost 1.59.0. You can easily download source and do
# sh bootstrap.sh && ./b2 && ./b2 install
If you have install other version of boost, you can uninstall it with
# rm /usr/local/lib/libboost*
# rm -rf /usr/local/include/boost
Two tweak have been done
Since I was building in Ubuntu, I use sudo prepend all command.
# cmake need a boost dir, which you can provide a download option
# cmake .. -DDOWNLOAD_BOOST=1 -DWITH_BOOST=~/code/boost/