Matters needing attention when compiling and installing MySQL5.7.17 source code
MySQL5.7.17 installation is slightly different from MySQL5.6. You need to specify boost, otherwise the compiler installation will report an error.
Download address of boost:
Download:
# wget http://downloads.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz
Decompress:
# cd / root
# tar xvzf boost_1_59_0.tar.gz
Enter the boost_1_59_0 directory:
# cd / root/boost_1_59_0
Then compile and install. You can execute bootstrap.sh directly:
# sh. / bootstrap.sh
Building Boost.Build engine with toolset gcc... Tools/build/v2/engine/bin.linuxx86_64/b2
Detecting Python version... 2.6
Detecting Python root... / usr
Unicode/ICU support for Boost.Regex?... Not found.
Generating Boost.Build configuration in project-config.jam...
Bootstrapping is done. To build, run:
. / b2
To adjust configuration, edit 'project-config.jam'.
Further information:
-Command line help:
. / b2-help
-Getting started guide:
Http://www.boost.org/more/getting_started/unix-variants.html
-Boost.Build documentation:
Http://www.boost.org/boost-build2/doc/html/index.html
The next step is compilation, focusing on whether the compilation is successful:
#. / b2
And then there was a long wait until it finally appeared:
The Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
/ root/boost_1_59_0
The following directory should be added to linker library paths:
/ root/boost_1_59_0/stage/lib
It indicates that the compilation was successful.
Finally, execute:
. / b2 install-- prefix=/usr/local
Then you can compile MySQL5.7. You need to specify the directory of boost with-DWITH_BOOST=/root/boost_1_59_0:
# cmake. -DCMAKE_INSTALL_PREFIX=/opt/mysql-DWITH_DEBUG=1-DDOWNLOAD_BOOST=1-DWITH_BOOST=/root/boost_1_59_0