[debian-mysql] Bug#1100655: mariadb-common 10.11.11-0+deb12u1 breaks mariadb and prevents other upgrades
Gareth Evans
donotspam at fastmail.fm
Sun Mar 16 17:33:05 GMT 2025
Package: mariadb-common
Version: 10.11.11-0+deb12u1
$ cat /etc/debian_version
12.10
apt upgrade failed. Retry showed:
$ sudo apt update; sudo apt upgrade
<snip>
Preconfiguring packages ...
48 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/133 MB of archives.
After this operation, 474 MB of additional disk space will be used.
Setting up mariadb-common (1:10.11.11-0+deb12u1) ...
update-alternatives: error: alternative path /etc/mysql/mariadb.cnf doesn't exist
dpkg: error processing package mariadb-common (--configure):
installed mariadb-common package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
mariadb-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
/etc/mysql/mariadb.cnf doesn't exist on my system, but is provided within the mariadb-common package:
$ ls /etc/mysql/*cnf
/etc/mysql/debian.cnf
$ dpkg -x /var/cache/apt/archives/mariadb-common_1%3a10.11.11-0+deb12u1_all.deb ~/deb
$ dpkg -e /var/cache/apt/archives/mariadb-common_1%3a10.11.11-0+deb12u1_all.deb ~/deb
$ ls ~/deb/etc/mysql/*cnf
/home/user/deb/etc/mysql/mariadb.cnf
I copied mariadb.cnf to /etc/mysql/ from the extracted mariadb-common package files and retried the upgrade, which succeeded, but mariadb then produced
"SQLSTATE <some code> no such file or directory"
errors in my web apps.
After restarting the mariadb service:
$ sudo systemctl status mariadb
× mariadb.service - MariaDB 10.11.11 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Sun 2025-03-16 14:21:46 GMT; 15s ago
Duration: 7h 28min 31.155s
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Process: 1777879 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Process: 1777880 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 1777882 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment>
Process: 1777899 ExecStart=/usr/sbin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Main PID: 1777899 (code=exited, status=1/FAILURE)
CPU: 102ms
Mar 16 14:21:46 qwerty.local systemd[1]: Starting mariadb.service - MariaDB 10.11.11 database server...
Mar 16 14:21:46 qwerty.local sh[1777896]: [108B blob data]
Mar 16 14:21:46 qwerty.local sh[1777896]: Fatal error in defaults handling. Program aborted
Mar 16 14:21:46 qwerty.local mariadbd[1777899]: [100B blob data]
Mar 16 14:21:46 qwerty.local mariadbd[1777899]: Fatal error in defaults handling. Program aborted
Mar 16 14:21:46 qwerty.local systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 14:21:46 qwerty.local systemd[1]: mariadb.service: Failed with result 'exit-code'.
Mar 16 14:21:46 qwerty.local systemd[1]: Failed to start mariadb.service - MariaDB 10.11.11 database server.
The same status was reported after a reboot.
Then removing /etc/mysql/mariadb.cnf fixed it.
$ sudo mv /etc/mysql/mariadb.cnf /etc/mysql/mariadb.cnf.xxx
$ sudo systemctl restart mariadb
$ sudo systemctl status mariadb
● mariadb.service - MariaDB 10.11.11 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; preset: enab>
Active: active (running) since Sun 2025-03-16 14:30:37 GMT; 4s ago
...
So working again, but a messy/broken upgrade process for me.
Please let me know if I can provide further testing/debugging assistance.
Thanks
More information about the pkg-mysql-maint
mailing list