Mysql5.7编译安装
关闭防火墙和selinux
1.清理安装环境
yum erase mariadb mariadb-server mariadb-libs mariadb-devel -y
userdel -r mysql
rm -rf /etc/my*
rm -rf /var/lib/mysql
2.创建mysql用户
useradd -r mysql -M -s /bin/false
3.从官网下载Mysql5.7的tar包
wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-boost-5.7.27.tar.gz
4.安装编译工具
yum -y install ncurses ncurses-devel openssl-devel bison gcc gcc-c++ make
yum -y install cmake
5.创建mysql目录
mkdir -p /usr/local/{data,mysql,log}
6.解压下载好的tar包
tar xzvf mysql-boost-5.7.27.tar.gz -C /usr/local/
7.编译安装
cd /usr/local/mysql-5.7.27/
cm