How to control mariadb server using systemctl?

8,783
  • 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
    mariadb-server
      Depends: mariadb-server-10.0
    
    ~$ apt-cache -i depends mariadb-server-10.0 
    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
        passwd:i386
      Depends: perl
      Depends: psmisc
        psmisc:i386
     |Depends: debconf
      Depends: <debconf-2.0>
        cdebconf
        debconf
      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.

    /etc/init.d/mysql

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

     systemctl status mysql.service
    
Share:
8,783

Related videos on Youtube

Bulat M.
Author by

Bulat M.

Updated on September 18, 2022

Comments

  • Bulat M.
    Bulat M. over 1 year

    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?