[debian-mysql] Bug#1039705: mariadb-server-core: fails to start via systemd due to lacking permissions on /run

Marc Lehmann debian-reportbug at plan9.de
Wed Jun 28 13:15:31 BST 2023


Package: mariadb-server-core
Version: 1:10.11.3-1
Severity: normal

Dear Maintainer,

after upgrade to bookworm, mariadb no longer starts, because the socket directory
/run/myysqld does not exist.

this only happens when started via systemd. immediate reason is:

   install: cannot change owner and permissions of ‘/run/mysqld’: No such file or directory

when started via sysv, the command line or some invoke tool, this works,
because the start script runs as root. when started via system, the
service is started as user mysql, which does npt have permissions.

This seems to come form a file created during the upgrade called /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf.

The system had a "user=mysql" in mariadb.conf before the upgrade, so maybe this is where it is from.

I don't think moving user= form mariadb to the systemd unit makes sense,
as the user given to mariadb is the user the server changes to after
initialisation, so moving it to the systemd unit breaks things (as is the
case here).


-- System Information:
Debian Release: 12.0
  APT prefers stable-security
  APT policy: (990, 'stable-security'), (990, 'stable'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'oldstable-debug'), (500, 'unstable'), (500, 'testing'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, x32

Kernel: Linux 6.1.35-schmorp (SMP w/24 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_USER, TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages mariadb-server-core depends on:
ii  libc6           2.36-9
ii  libcrypt1       1:4.4.33-2
ii  libnuma1        2.0.16-1
ii  libpcre2-8-0    10.42-1
ii  libpmem1        1.12.1-2
ii  libssl3         3.0.9-1
ii  libstdc++6      12.2.0-14
ii  libsystemd0     252.6-1
ii  liburing2       2.3-3
ii  mariadb-common  1:10.11.3-1
ii  zlib1g          1:1.2.13.dfsg-1

mariadb-server-core recommends no packages.

mariadb-server-core suggests no packages.

-- no debconf information


More information about the pkg-mysql-maint mailing list