当前位置: 代码迷 >> 综合 >> Failed to start mysql.service Unit not found.
  详细解决方案

Failed to start mysql.service Unit not found.

热度:61   发布时间:2023-12-15 01:17:40.0

执行完yum安装命令后发现竟然无法启动错误提示如下

[root@localhost ~]# systemctl start mysql.service

Failed to start mysql.service: Unit mysql.service not found.

查了半天资料,终于了解到MariaDB代替了mysql数据库

因此用上述命令启动不起来,正确的方法如下

# yum install mariadb -y //如果已安装可以省略

# systemctl start mariadb.service //启动服务

# systemctl enable mariadb.service //开机启动服务

# mysql -u root -p //登录mysql

  相关解决方案