编程爱好者之家

Failed to start mysqld.service: Unit not found.

2024-11-03 14:36:36 5

centos7在安装mysql的时候执行yum -y install mysql-community-server提示Failed to start mysqld.service: Unit not found,解决方案如下:


1.切换到/etc/yum.repos.d/文件夹下

cd /etc/yum.repos.d/

2、移除CentOS-Base.repo

rm -f CentOS-Base.repo

3、下载mysql的rpm包

wget http://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
wget /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

4、安装mysql

yum -y install mysql57-community-release-el7-11.noarch.rpm
yum -y install mysql-server  --nogpgcheck


同类文章