CentOS7安装mysql后无法启动服务,提示Failed to start mysqld.service: Unit not found

Posted nhdlb

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS7安装mysql后无法启动服务,提示Failed to start mysqld.service: Unit not found相关的知识,希望对你有一定的参考价值。

 

首先:需要更新你的yum源,保证yum源最新。

 

1.安装:

yum install -y mariadb-server

 

2.启动maria DB服务:

systemctl start mariadb.service

 

(说明:CentOS 7.x开始,CentOS开始使用systemd服务来代替daemon,原来管理系统启动和管理系统服务的相关命令全部由systemctl命令来代替。)

 

3.将mariadb服务添加至开机自启动:

systemctl enable mariadb.service

以上是关于CentOS7安装mysql后无法启动服务,提示Failed to start mysqld.service: Unit not found的主要内容,如果未能解决你的问题,请参考以下文章