mysql 5.7.23编译过程及报错。

下面我们进行mysql的编译安装步骤以及报错。
wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-5.7.23.tar.gz
tar -zxf mysql-5.7.23.tar.gz 

报错:
1、boost报错。

CMake Error at cmake/boost.cmake:81 (MESSAGE):
  You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST=

  This CMake script will look for boost in .  If it is not there,
  it will download and unpack it (in that directory) for you.

  If you are inside a firewall, you may need to use an http proxy:

  export http_proxy=http://example.com:80

Call Stack (most recent call first):
  cmake/boost.cmake:238 (COULD_NOT_FIND_BOOST)
  CMakeLists.txt:506 (INCLUDE)


-- Configuring incomplete, errors occurred!
See also "/software/mysql-5.7.23/CMakeFiles/CMakeOutput.log".
See also "/software/mysql-5.7.23/CMakeFiles/CMakeError.log".

这个错误很明显,需要安装一个boost的安装包,但是mysql 5.7之前是不用安装的,mysql5.7开始有了这个安装包,需要我们单独去安装。
下载链接,请点击
或者

wget http://www.sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz
mkdir /etc/boost
cd /etc/boost
cp /software/boost_1_59_0.tar.gz /etc/boost
tar -zxf boost_1_59_0.tar.gz 
cd /software/mysql.5.7.23

cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/mydata/data -DSYSCONFDIR=/etc -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DWITH_ZLIB=system -DWITH_LIBWRAP=0 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DDEFAULT_=utf8_general_ci -DDOWNLOAD_BOOST=1 --DWITH_BOOST=/etc/boost
   95  cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/mydata/data -DSYSCONFDIR=/etc -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DWITH_ZLIB=system -DWITH_LIBWRAP=0 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DDEFAULT_=utf8_general_ci -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/etc/boost
echo $?
make && make install

等待编译安装即可。

你可能感兴趣的:(centos,mysql)