mysql yum repository 5.6.31,Centos6下通过Yum Repository安装MySQL8.0

通过Yum Repository安装MySQL8.0

安装Yum Repository

## Centos6下下载:

wget https://repo.mysql.com//mysql80-community-release-el6-3.noarch.rpm

## Centos7下下载

wget https://repo.mysql.com//mysql80-community-release-el7-3.noarch.rpm

## Centos8下下载:

wget https://repo.mysql.com//mysql80-community-release-el8-1.noarch.rpm

## Centos6下安装Yum Repository

rpm -ivh mysql80-community-release-el6-3.noarch.rpm

## 备注:安装完毕之后在/etc/yum.repos.d/目录下多了mysql-community.repo和mysql-community-source.repo 这两个文件。

使用Yum Repository来安装MySQL8.0

## 方法1修改配置项

修改/etc/yum.repos.d/mysql-community.repo文件,其中enabled=1表示要安装的版本(本次安装8.0版本),其它版本均为0.

# Enable to use MySQL 5.6

[mysql56-community]

name=MySQL 5.6 Community Server

baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/

enabled=0

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

# Enable to use MySQL 5.7

[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

[mysql80-community]

name=MySQL 8.0 Community Server

baseurl=http://repo.mysql.com/yum/mysql-8.0-community/el/6/$basearch/

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

## 方法2修改配置项

yum-config-manager --disable mysql57 -community

yum-config-manager --enable mysql80 -community

## 安装最新GA 8.0版的MySQL

yum install mysql-community-server

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值