请仔细观看文档后,如果符合这个错误,再通过这种方式解决,不要盲目复制
问题:Failed to start mysqld.service: Unit not found.
原因:MySQL没有安装成功,就启动MySQL
如果是在使用"yum -y install mysql-community-server"命令安装mysql的时候,没有安装成功(原因:密钥已安装但是不适用此软件包)
然后,使用 "systemctl start mysqld.service " 命令启动MySQL时,报 "Failed to start mysqld.service: Unit not found."错误
解决:运行 rpm 命令更新检索秘钥,即可
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
或
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
其它情况导致无法安装成功,请百科
参考:
CentOS 7 yum 安装软件密钥包检索问题
版权归原作者 爱写代码的小菜鸡 所有, 如有侵权,请联系我们删除。