[debian-mysql] Bug#974910: mariadb-server-10.3: Multi-instance start-up problems (debian-start)

Chris Linn ml at backendmedia.com
Mon Nov 16 11:35:49 GMT 2020


Package: mariadb-server-10.3
Version: 1:10.3.25-0+deb10u1
Severity: important

Dear Maintainer,

* What led up to the situation?
Using multiple mariadb instances with the supported systemd way: /lib/systemd/system/mariadb at .service
Created an instance config in /etc/mysql/conf.d/mytest.cnf. Service starts when running: systemctl start mariadb at test
However in journalctl -xe you'll see:
Nov 16 12:12:35 debian-4gb-nbg1-1 /etc/mysql/debian-start[5977]: Upgrading MySQL tables if necessary.
Nov 16 12:12:35 debian-4gb-nbg1-1 /etc/mysql/debian-start[5980]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
Nov 16 12:12:35 debian-4gb-nbg1-1 /etc/mysql/debian-start[5980]: Looking for 'mysql' as: /usr/bin/mysql
Nov 16 12:12:35 debian-4gb-nbg1-1 /etc/mysql/debian-start[5980]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Nov 16 12:12:35 debian-4gb-nbg1-1 /etc/mysql/debian-start[5980]: Version check failed. Got the following error when calling the 'mysql' command line client
Nov 16 12:12:35 debian-4gb-nbg1-1 /etc/mysql/debian-start[5980]: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Nov 16 12:12:35 debian-4gb-nbg1-1 /etc/mysql/debian-start[5980]: FATAL ERROR: Upgrade failed
Nov 16 12:12:35 debian-4gb-nbg1-1 /etc/mysql/debian-start[5989]: Checking for insecure root accounts.
Nov 16 12:12:35 debian-4gb-nbg1-1 debian-start[5975]: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

This is because the debian-start script is not multi-instance aware.
Interestingly enough in the header of /etc/mysql/debian-start it is written:
NOTE: This file is read only by the traditional SysV init script, not systemd.

But if you check /lib/systemd/system/mariadb at .service it has a line which says:
ExecStartPost=/etc/mysql/debian-start

So either remove the line from /lib/systemd/system/mariadb at .service or make /etc/mysql/debian-start multi-instance aware by reading the correct cnf files. Or at least don't start the file when using in multi-instance mode.
On the other side it would be nice to have a multi-instance aware version of debian-start because the functionality is really helpful.

Best regards,
Chris



More information about the pkg-mysql-maint mailing list