[debian-mysql] Bug#1108553: mariadb-server: Upgrading 1:11.8.1-4 to 1:11.8.2-1 generates warning and error, but appears to work
Daniel Lewart
lewart3 at gmail.com
Tue Jul 1 04:00:00 BST 2025
Package: mariadb-server
Version: 1:11.8.2-1
Severity: minor
Dear Otto, et al,
Upgrading mariadb-server from version 1:11.8.1-4 to 1:11.8.2-1
generates a warning and an error, but appears to work:
$ sudo apt-get install mariadb-server
...
Setting up mariadb-server (1:11.8.2-1) ...
Warning: The unit file, source configuration file or drop-ins of mariadb.service changed on disk. Run 'systemctl daemon-reload' to reload units.
$ journalctl -p3 -t mariadb-server.postinst
... debian mariadb-server.postinst[nnnnn]: mysql.user table already exists!
... debian mariadb-server.postinst[nnnnn]: Run mariadb-upgrade, not mariadb-install-db
$ sudo mariadb-upgrade
This installation of MariaDB is already upgraded to 11.8.1-MariaDB.
There is no need to run mariadb-upgrade again for 11.8.2-MariaDB, because they're both 11.8.
You can use --force if you still want to run mariadb-upgrade
Relevant excerpt from mariadb-server.postinst:
185 # initiate databases. Output is not allowed by debconf :-(
186 # This will fail if we are upgrading an existing database; in this case
187 # mariadb-upgrade, called from the /etc/mysql/debian-start script, will
188 # handle things.
189 # Debian: beware of the bashisms...
190 # Debian: can safely run on upgrades with existing databases
191 # Workaround for Debian Bug #1022994: failure to create database when
192 # working with libpam-tmpdir (by setting TMPDIR to empty value).
193 set +e
194 TMPDIR='' bash /usr/bin/mariadb-install-db \
195 --rpm --cross-bootstrap \
196 --user=mysql --disable-log-bin \
197 --skip-test-db 2>&1 |
198 $ERR_LOGGER
199 set -e
Perhaps the journal errors could be addressed by the following?:
if [ ! -f "$mysql_datadir/mysql/user.frm" ]; then
<excerpt>
fi
Also, why is "--rpm --cross-bootstrap" used?
Thank you!
Daniel Lewart
Urbana, Illinois
More information about the pkg-mysql-maint
mailing list