'Error "Failed to start mariadb.service: Unit mariadb.service not found"
I'm using Fedora 29.
I'm try to run mariadb.service with command:systemctl start mariadb,
and give error:Failed to start mariadb.service: Unit mariadb.service not found.
Also, I tried next commands:systemctl status mariadbUnit mariadb.service could not be found.
systemctl start mariadb.serviceFailed to start mariadb.service: Unit mariadb.service not found.
systemctl start mysqlFailed to start mysql.service: Unit mysql.service not found.
systemctl enable mariadbFailed to enable unit: Unit file mariadb.service does not exist.
systemctl daemon-reload<nothing to output>
I trying this with sudo and without. The result is same.
mariadb-server is installed:dnf install mariadb-server
Package mysql-community-server-8.0.15-1.fc29.x86_64 already installed.
Just starting to use Linux, I can not understand what's the trouble.
Solution 1:[1]
It was quite confusing to me too. I followed several instructions found online but it seems that even talking about the same version 5.5 there are quite a few different ways to start the service after installation. I finally accidentally tried mysql and it worked.
when seeing this after a successful installation:
Installed: MariaDB-server.x86_64 0:5.5.67-1.el7.centos
Dependency Installed: MariaDB-client.x86_64 0:5.5.67-1.el7.centos
Complete!
and I tried:
$ sudo systemctl start mariadb
Failed to start mariadb.service: Unit not found.
and I tried:
$ sudo systemctl start mysql
there was a silence. and I tried:
$ sudo systemctl status mysql
It said it's active(running).
Solution 2:[2]
You have MySQL 8 installed which is why your installation of MariaDB failed: the two conflict and you must pick which one you want.
If you want to install MariaDB, you first have to uninstall MySQL 8 first:
dnf remove mysql-community-server
dnf install mariadb-server
Historically, both MySQL and MariaDB used to use mysql as the service name. The MySQL 8 package uses only the mysql service name whereas MariaDB has both mariadb and mysql services, the latter being an alias to the mariadb one.
MariaDB added its own service name quite early on in the 10 series of releases and has added aliases for other commands as well. For example, the mariadb command is the same program as the mysql command in MariaDB 10.5.
Solution 3:[3]
you can use rpm -ql mysql-community-server-8.0.15-1 in order to find where the package is installed. then you can find executables from this path and try to run it
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Community |
| Solution 2 | markusjm |
| Solution 3 | Dervi? Kay?mba??o?lu |
