[MDEV-21793] The mariadb.service unit not enabled after MDB set up (enabled commands to start at boot) Created: 2020-02-21  Updated: 2023-04-27

Status: Confirmed
Project: MariaDB Server
Component/s: Scripts & Clients, Server
Affects Version/s: 10.1, 10.4.12, 10.2, 10.3, 10.4
Fix Version/s: 10.4

Type: Bug Priority: Minor
Reporter: Wagner Bianchi (Inactive) Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-19432 Systemd service does not get re-enabl... Closed

 Description   

Hello Folks,

Any reason for the mariadb.service unit not be enabled to start at OS boot for the MariaDB Server 10.4.12, as it is for the 10.3?

[BIANCHI LABS] root@opmdb01: ~ # systemctl is-enabled mariadb.service
disabled
 
[BIANCHI LABS] root@opmdb01: ~ # mysqld --version
mysqld  Ver 10.4.12-MariaDB-log for Linux on x86_64 (MariaDB Server)
 
[BIANCHI LABS] root@opmdb01: ~ # rpm -qa | grep -i mariadb
MariaDB-client-10.4.12-1.el7.centos.x86_64
MariaDB-common-10.4.12-1.el7.centos.x86_64
MariaDB-backup-10.4.12-1.el7.centos.x86_64
MariaDB-compat-10.4.12-1.el7.centos.x86_64
MariaDB-server-10.4.12-1.el7.centos.x86_64

Thanks!



 Comments   
Comment by Wagner Bianchi (Inactive) [ 2020-02-21 ]

Or we enable that during the setup of the package:

[BIANCHI LABS] root@opmdb01: ~ # systemctl --now enable mariadb.service
Created symlink from /etc/systemd/system/mysql.service to /usr/lib/systemd/system/mariadb.service.
Created symlink from /etc/systemd/system/mysqld.service to /usr/lib/systemd/system/mariadb.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
 
[BIANCHI LABS] root@opmdb01: ~ # systemctl is-enabled mariadb.service
enabled

Or we add the above the installation documentation.

Comment by Elena Stepanova [ 2020-03-07 ]

I assume by "as it is for the 10.3" you mean either 10.3.18 or earlier, or an upgrade from a previous version.

The difference apparently came with MDEV-19432.

commit 8fce180765b2ede9fb9f0f7ee6ffcda3386050bf
Author: Sergei Golubchik <serg@mariadb.org>
Date:   Wed Oct 30 09:50:52 2019 +0100
 
    MDEV-19432 Systemd service does not get re-enabled after upgrade
    
    following Fedora recommendations (see %systemd_post macro in FC29)
    let's do `systemctl preset` on the first installation of the server

The postin script did and still does enable the service, but then /usr/bin/systemctl preset mariadb.service disables it again – at least on CentOS, for new installations.

Generated at Thu Feb 08 09:09:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.