centos安装mysql遇到问题

img

要先安装mysql源,不然仓库里面找不到

yum localinstall mysql57-community-release-el7-8.noarch.rpm

验证是否被yum仓库收纳mysql的源,看到mysql相关repo则说明添加源成功

ls -1 /etc/yum.repos.d/mysql-community*

接下来再安装真正的mysql-server

yum install mysql-community-server

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

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

第二步:下载mysql的repo源

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

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

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

第四步:查看下


[root@master ~]# ls -1 /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@master ~]# yum install mysql-server

我总结了安装教程,实测有效,步骤很详细
CentOS7安装MySQL,全网最快安装教程_大鹏展翅-CSDN博客 第一步:下载yum源wget 'https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm'第二步:安装yum源rpm -Uvh mysql57-community-release-el7-11.noarch.rpm第三步:查看有哪些版本的mysqlyum repolist all | gre... https://blog.csdn.net/qq_19309473/article/details/103195136