[debian-mysql] Bug#865083: mariadb-server-10.1: mariadb at .service doesn't create /var/run/mysqld
Toby Chamberlain
toby at webtechservices.com.au
Mon Jun 19 06:15:44 UTC 2017
Package: mariadb-server-10.1
Version: 10.1.23-9+deb9u1
Severity: grave
Tags: patch
Justification: renders package unusable
Dear Maintainer,
After upgrading from Jessie to Stretch I was unable to get my multi-instance mySQL setup working using the installed .service files.
I have a machine with 2 mySQl instances running, which in Jessie I managed with mysqld_multi in an init.d script. This is no longer supported with systemd/mariadb in Stretch (only the first instance was started) and so I changed to using the"mariadb at .service" to invoke each instance. Once this was up and running I rebooted and both mySQL instanced failed to start, with:
[ERROR] Can't start server : Bind on unix socket: No such file or directory
[ERROR] Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ?
..in syslog. On inspection the /var/run/mysqld directory did not exist. I created it and both instances started manually, but after a reboot the same problem persisted. I fixed the problem by copying the line that creates /var/run/mysqld from the single-instance mariadb.service.
Diff:
@@ -65,6 +65,8 @@
# Execute pre and post scripts as root, otherwise it does it as User=
PermissionsStartOnly=true
+ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld
+
The mariadb and mariadb@ services can't both be active at once, so I think this is a serious bug that breaks the ability to run multiple mySQL instances out of the box.
I had a few other issues after the upgrade too, I'm not sure if they count as bugs or not because I had a mysqld_multi stule my.cnf (ie with [mysqld1], [mysqld2] sections) so I don't know if they would occur with an existing single-instance install.
1. My main [mysqld] config settings were being overwritten by a 50_server.cnf file in mariadb.conf.d, even after I copied them to a my.cnf file in conf.d. I had to deleted the 50_server.cnf to recreate the server I had on Jessie. And should this file be in mariadb.conf.d anyway when it's got non-mariadb-specific settings like cache sizes etc (I may have caught it sooner if it were in conf.d)?
2. I had to run mysql_upgrade on both databases after the install - should this be automatic?
Toby
-- System Information:
Debian Release: 9.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.0-3-amd64 (SMP w/24 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages mariadb-server-10.1 depends on:
ii adduser 3.115
ii debconf [debconf-2.0] 1.5.61
ii galera-3 25.3.19-2
ii gawk 1:4.1.4+dfsg-1
ii init-system-helpers 1.48
ii iproute2 4.9.0-1
ii libaio1 0.3.110-3
ii libc6 2.24-11
ii libdbi-perl 1.636-1+b1
ii libpam0g 1.1.8-3.6
ii libstdc++6 6.3.0-18
ii libsystemd0 232-25
ii lsb-base 9.20161125
ii lsof 4.89+dfsg-0.1
ii mariadb-client-10.1 10.1.23-9+deb9u1
ii mariadb-common 10.1.23-9+deb9u1
ii mariadb-server-core-10.1 10.1.23-9+deb9u1
ii passwd 1:4.4-4.1
ii perl 5.24.1-3
ii psmisc 22.21-2.1+b2
ii rsync 3.1.2-1
ii socat 1.7.3.1-2+b1
ii zlib1g 1:1.2.8.dfsg-5
Versions of packages mariadb-server-10.1 recommends:
ii libhtml-template-perl 2.95-2
Versions of packages mariadb-server-10.1 suggests:
ii mailutils [mailx] 1:3.1.1-1
pn mariadb-test <none>
pn netcat-openbsd <none>
pn tinyca <none>
-- Configuration Files:
/etc/init.d/mysql changed [not included]
/etc/mysql/mariadb.conf.d/50-server.cnf [Errno 2] No such file or directory: '/etc/mysql/mariadb.conf.d/50-server.cnf'
-- debconf information excluded
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-mysql-maint/attachments/20170619/2b5d7f00/attachment-0001.html>
More information about the pkg-mysql-maint
mailing list