CentOS升级MySQL

版本:5.6

  1. 下载yum源文件
wget https://repo.mysql.com//mysql57-community-release-el6-11.noarch.rpm
  1. 安装yum源
rpm -ivh mysql57-community-release-el6-11.noarch.rpm 
  1. 修改版本信息
vi /etc/yum.repos.d/mysql-community.repo 
[mysql56-community] 
name=MySQL 5.6 Community Server 
baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/ 
enabled=1 
gpgcheck=1 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql 

[mysql57-community] 
name=MySQL 5.7 Community Server 
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/ 
enabled=0 
gpgcheck=1 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql 
  1. 重建yum cache
yum makecache 
  1. 安装mysql相关app
yum -y install mysql-community-libs-compat mysql-community-common mysql-community-server mysql-community-libs mysql-community-devel mysql-community-client 

你可能感兴趣的:(CentOS升级MySQL)