I try to install mariadb on centos 7 using official documentation https://mariadb.com/kb/en/mariadb/yum/

I have installed these packages:

Installed Packages
MariaDB-server.x86_64                   5.5.47-1.el7.centos             @mariadb
MariaDB-client.x86_64                   5.5.47-1.el7.centos             @mariadb
MariaDB-common.x86_64                   5.5.47-1.el7.centos             @mariadb

And I try to start mariadb service using 'systemctl start mariadb' but I always get a error Failed to issue method call: Unit mariadb.service failed to load: No such file or directory.

After rebooting I can login into database as a root. But I can't understand the reason, why there's no mariadb service.

Also I have a MariaDB.repo file like this:

# MariaDB 5.5 CentOS repository list - created 2016-01-12 10:44 UTC
# http://mariadb.org/mariadb/repositories/
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/centos7-amd64
  • Are you missing mariadb-libs.x86_64 ? – pun Jan 12 '16 at 15:32
  • It's added MariaDB-shared from mariadb repository instead of it. But the problem still the same. – wazz Jan 12 '16 at 15:38
  • Also I removed the mariadb repo file and install maria-db from base centos 7 repo. And it will work. Is this a bug? Or is it my mistake with repo? – wazz Jan 12 '16 at 15:39

Looking at their packages, I can see that they don't include a systemd service file in their 5.5 packages. They do ship a legacy init script at /etc/init.d/mysql, so you could technically just run systemctl start mysql and systemd's legacy compatibility will take care of it.

$ repoquery --enablerepo mariadb --list MariaDB-server | grep init

Me personally, I'd rather stick to the stock CentOS packages, which have a proper systemd service unit file included. As a general rule, most software projects are the experts on their software, not on RPM packaging best practices.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.