Installed MariaDB via

apt install mariadb-server

Wanted to start it, but it seems that mariadb-server.service is not installed:

systemctl enable mariadb
systemctl enable mariadb-server

they both fail.

dpkg -L mariadb-server-10.0 | grep service

shows nothing. But various tutorials on the web instruct to issue these commands.

How to install .service files and why they are absent?

  • mariadb-server is a metapackage, so it is empty & it is created only for dependencies declarations

    ~$ apt-cache search "mariadb-server*"
    auth2db - Powerful and eye-candy IDS logger, log viewer and alert generator
    mariadb-server - MariaDB database server (metapackage depending on the latest version)
    mariadb-server-10.0 - MariaDB database server binaries
    mariadb-server-core-10.0 - MariaDB database core server files
    ~$ apt-cache depends mariadb-server
      Depends: mariadb-server-10.0
    ~$ apt-cache -i depends mariadb-server-10.0 
      PreDepends: adduser
      PreDepends: debconf
      PreDepends: mariadb-common
      Depends: libdbi-perl
      Depends: lsb-base
      Depends: mariadb-client-10.0
      Depends: mariadb-server-core-10.0
      Depends: passwd
      Depends: perl
      Depends: psmisc
     |Depends: debconf
      Depends: <debconf-2.0>
      Depends: libaio1
      Depends: libc6
      Depends: libpam0g
      Depends: libstdc++6
      Depends: zlib1g
  • It does not have a systemd entry but an init.d one with different name.


    systemd-sysv-generator should have already generated a service file with same name, check it:

     systemctl status mysql.service

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.