CentOS8安装MySQL报错,解决Failed to start mysqld.service: Unit not found

2021/4/8 19:27:53

本文主要是介绍CentOS8安装MySQL报错,解决Failed to start mysqld.service: Unit not found,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

#启动mysql时会提示找不到对应的服务
[root@ceph-104 ~]# service mysqld restart
Redirecting to /bin/systemctl restart mysqld.service
Failed to restart mysqld.service: Unit mysqld.service not found.
[root@ceph-104 ~]# /bin/systemctl restart mysqld.service

原因是centos8不支持mysql,需要更换成MariaDB

首先需要安装mariadb-server

[root@ceph-104 ~]# yum install mariadb-server -y

启动服务

[root@ceph-104 ~]# systemctl start mariadb.service

添加到开机启动

[root@ceph-104 ~]# systemctl enable mariadb.service



这篇关于CentOS8安装MySQL报错,解决Failed to start mysqld.service: Unit not found的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程