Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.6, 11.4
-
None
-
All Debian based distributions
Description
The /etc/mysql/debian-start script on apt/deb distributions sets up helper commands as:
MARIADB="/usr/bin/mariadb --defaults-file=/etc/mysql/debian.cnf"
|
MYADMIN="/usr/bin/mariadb-admin --defaults-file=/etc/mysql/debian.cnf"
|
# Don't run full mariadb-upgrade on every server restart, use --version-check to do it only once
|
MYUPGRADE="/usr/bin/mariadb-upgrade --defaults-extra-file=/etc/mysql/debian.cnf --version-check --silent"
|
Note that the first two command stubs use --defauts-file, so totally replacing existing configuration with the debian.cnf file, while the last one uses --defaults-extra-file, so only overriding settings that actually exist in debian.cnf
When using a non-standard socket path and having that in /etc/my.cnf or one of the files included by it this changed setting is not in effect when using --defaults-file, and so leading to errors like
Jan 21 15:29:40 zd-dbsrv-1 systemd[1]: Started mariadb.service - MariaDB 11.4.4-2 database server.
|
Jan 21 15:29:40 zd-dbsrv-1 /etc/mysql/debian-start[21395]: Checking for insecure root accounts.
|
Jan 21 15:29:40 zd-dbsrv-1 debian-start[21398]: ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
|
This does not stop the server from starting, but the correct way would be to use --defaults-extra-file instead of --defaults-file to make the debian startup maintenance scripts work as intended.
PS: basically affects all MariaDB versions, not only 10.6 and 11.4
PPS: We might want to report this to Debian upstream, too)