【Linux】centos7下解决yum -y install mysql-server 没有可用包

第一步:安装从网上下载文件的wget命令

[root@localhost ~]# yum -y install wget

第二步:下载mysql的repo源

[root@localhost ~]# wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm 

第三步:安装mysql-community-release-el7-5.noarch.rpm包

[root@localhost ~]# rpm -ivh mysql-community-release-el7-5.noarch.rpm

第四步:查看确认下

[root@localhost ~]# ls -l  /etc/yum.repos.d/mysql-community*

/etc/yum.repos.d/mysql-community.repo

/etc/yum.repos.d/mysql-community-source.repo

会获得两个mysql的yum repo源:/etc/yum.repos.d/mysql-community.repo,/etc/yum.repos.d/mysql-community-source.repo。

第五步:安装mysql

[root@localhost ~]# yum install mysql-server

 

posted @ 2019-08-22 17:01  印菲  阅读(2684)  评论(0编辑  收藏  举报