mysql - 错误 "Failed to start mariadb.service: Unit mariadb.service not found"

标签 mysql linux mariadb fedora

我使用的是 Fedora 29。 我尝试运行 mariadb.service使用命令:
systemctl start mariadb ,
并给出错误:
Failed to start mariadb.service: Unit mariadb.service not found.

此外,我尝试了以下命令:
systemctl status mariadb
Unit mariadb.service could not be found.

systemctl start mariadb.service
Failed to start mariadb.service: Unit mariadb.service not found.

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

systemctl enable mariadb
Failed to enable unit: Unit file mariadb.service does not exist.

systemctl daemon-reload
<nothing to output>

我尝试使用 sudo和没有。结果是一样的。

mariadb-server已安装:
dnf install mariadb-server Package mysql-community-server-8.0.15-1.fc29.x86_64 already installed.

刚开始使用Linux,我不明白有什么问题。

最佳答案

您安装了 MySQL 8,这就是您安装 MariaDB 失败的原因:两者冲突,您必须选择您想要的一个。

如果你想安装MariaDB,你首先必须先卸载MySQL 8:

dnf remove mysql-community-server
dnf install mariadb-server

历史上,MySQL 和 MariaDB 都曾使用 mysql 作为服务名称。 MySQL 8 软件包仅使用 mysql 服务名称,而 MariaDB 同时具有 mariadbmysql 服务,后者是 mariadb 服务的别名。

MariaDB 在 10 系列版本中很早就添加了自己的服务名称,并且还为其他命令添加了别名。例如,mariadb 命令与 MariaDB 10.5 中的 mysql 命令是同一程序。

关于mysql - 错误 "Failed to start mariadb.service: Unit mariadb.service not found",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54501338/

相关文章:

mysql时间戳比较日期字符串

php - 在一个php页面中的MYSQL多选查询

mysql - 从 MySQL 表中获取具有不同关系的对象的值 : several queries or one?

linux - bash ftp : put only newer files just like filezilla

java - 将 galera mariadb 与 jdbc 结合使用

python - MariaDB 在 Debian Stretch 中对重复键执行许多操作

php - 如何更正存储在 mysql 中的特殊字符的输出

c - 如何计算 ls 多列显示所需的列宽?

linux - RPM - 签名后修改包

php - 具有最少字符数的排序规则*对于散列密码是必需的*