1、下载MysqL5.7.18源码(带有boost)
下载 地址为https://dev.mysql.com/downloads/mysql/
参考:http://www.jb51.cc/article/p-xoyhkdht-xp.htmlgroupadd MysqL #添加MysqL用户组useradd -r -g MysqL -s /bin/false MysqL #添加MysqL用户 3、编译MysqL源码 及安装 参考https://dev.mysql.com/doc/refman/5.7/en/installing-source-distribution.htmlcmake . -DCMAKE_INSTALL_PREFIX=/usr/local/MysqL -DMysqL_DATADIR=/usr/local/MysqL/data -DWITH_BOOST=/home/wl/MysqL-5.7.18/boost/boost_1_59_0-DSYSCONFDIR=/etc -DDEFAULT_CHARSET=utf8mb4 -DDEFAULT_COLLATION=utf8mb4_general_ci -DENABLED_LOCAL_INFILE=1 -DEXTRA_CHARSETS=all make make install 4、初始化系统数据库cd /usr/local/MysqLchown -R MysqL:MysqL ../bin/MysqLd --initialize --user=MysqL --basedir=/usr/local/MysqL –datadir=/usr/local/MysqL/data./bin/MysqL_ssl_rsa_setupchown -R root .chown -R MysqL databin/MysqLd_safe --user=MysqL & 也可以服务自启动 cp support-files/MysqL.server /etc/init.d/MysqLdupdate-rc.d defaultsrm -f CMakeCache.txt
5、启动在编译过程中失败时使用service MysqLd start来启动
service MysqLd stop 关闭服务
servcie MysqLd restart重启服务
make clean
然后再重新编译