Centos6 使用yum安装 mysql 5.7

直接使用yum安装默认安装的是mysql 5.1版本,要想安装mysql 5.7 需要设置yum源

1.检查系统默认mysql,并删除

yum list installed | grep mysql
yum -y remove mysql-libs.x86_64

2.添加rpm源,并设置最新的源(注意,yum-config-manager命令如果不存在,需要 yum install yum-utils)

wget dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
yum localinstall mysql-community-release-el6-5.noarch.rpm
yum repolist all | grep mysql 
yum-config-manager --disable mysql55-community
yum-config-manager --disable mysql56-community
yum-config-manager --enable mysql57-community-dmr
yum repolist enabled | grep mysql

 

3.然后就可以正常安装mysql了

yum install mysql-community-server

 

posted @ 2016-07-20 09:35  茫海  阅读(405)  评论(0编辑  收藏  举报