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

执行完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

你可能感兴趣的:(问题,Linux)