当前位置:Gxlcms > 数据库问题 > CentOS7安装MySQL报错Failed to start mysqld.service: Unit not found解决办法

CentOS7安装MySQL报错Failed to start mysqld.service: Unit not found解决办法

时间:2021-07-01 10:21:17 帮助过:2357人阅读

1 ~]# systemctl start mysql.service
要启动MySQL数据库是却是这样的提示

1 ~]# Failed to start mysqld.service: Unit not found
解决方法如下:

首先需要安装mysql-server

1 ~]# yum install -y mysql-server
启动服务

1 ~]# systemctl start mysqld.service
添加到开机启动

1 ~]# systemctl enable mysqld.service

之后连接数据库 mysql 命令

CentOS7安装MySQL报错Failed to start mysqld.service: Unit not found解决办法

标签:not   解决   centos7   led   service   systemctl   服务   centos7安装   emctl   

人气教程排行