0、下载对应的MySQL的RPM文件
https://dev.mysql.com/downloads/mysql/
1、查看CentOS自带MySQL 5.1组件并卸载。
rpm -qa | grep -i mysql
rpm -e --nodeps mysql-libs-5.1.61-4.el6.x86_64
2、 安装依赖(MySQL 5.5并不需要这个依赖,但是5.7必须要,否则server组件无法安装成功)
yum -y install numactl
3、 安装MySQL(下面的安装顺序不能错,否则会安装失败)
rpm -ivh mysql-community-common-5.7.10-1.el6.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.10-1.el6.x86_64.rpm
rpm -ivh mysql-community-client-5.7.10-1.el6.x86_64.rpm
rpm -ivh mysql-community-server-5.7.10-1.el6.x86_64.rpm
如果报如下错误:
mysql-community-libs(x86-64) >= 5.7.9 is needed by mysql-community-client-5