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

猜你喜欢

转载自www.cnblogs.com/nhdlb/p/11569211.html