1、安装依赖
yum -y install wget cmake gcc gcc-c++ ncurses ncurses-devel libaio-devel openssl openssl-devel
2、下载安装包
wget https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-boost-8.0.11.tar.gz (如果wget下载速度太慢,可用迅雷下载然后用ftp上传到服务器)
3、创建mysql用户
groupadd mysql
useradd -r -g mysql -s /bin/false mysql
4、创建安装目录跟数据目录
mkdir -p /usr/local/mysql
mkdir -p /data/mysql
5、解压压缩包
tar -zxf mysql-boost-8.0.11.tar.gz
6、编译
cd mysql-8.0.11
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data -DSYSCONFDIR=/etc -DMYSQL_TCP_PORT=3306 -DWITH_BOOST=/usr/local/src/mysql-8.0.11/boost
7、安装
make && make install