• 微信公众号:美女很有趣。 工作之余,放松一下,关注即送10G+美女照片!

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

开发技术 开发技术 2周前 (04-08) 3次浏览
#启动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


喜欢 (0)