Until yesterday I had mariadb 10.6 running on my system (bookworm/sid).
It was behaving strangely, so I decided to stop it, uninstall it, remove
all databases during uninstall (it's a developer system, so no real data
to save there) and install it again.
Before reinstalling it, I checked that /var/lib/mysql did not exist
anymore. I even manually removed /etc/mysql along with all the contained
files and purged dbconfig-common (just in case it matters), then I
rebooted the system and finally I installed mariadb-server with its
dependencies using aptitude. Installation went through without errors,
but it did not ask me to set a password for the mariadb root user (maybe
that's ok, I'm not sure).
However now mariadb does not run anymore, complaining with:
# systemctl status mariadb
× mariadb.service - MariaDB 10.6.7 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled;
vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2022-05-02 10:45:24
CEST; 8min ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Process: 4879 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root
-d /var/run/mysqld (code=exited, status=0/SUCCESS)
Process: 4880 ExecStartPre=/bin/sh -c systemctl unset-environment
_WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 4882 ExecStartPre=/bin/sh -c [ ! -e
/usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..;
/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment
_WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
Process: 4890 ExecStart=/usr/sbin/mariadbd $MYSQLD_OPTS
$_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Main PID: 4890 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
CPU: 136ms
mag 02 10:45:24 t470 mariadbd[4890]: 2022-05-02 10:45:24 0 [ERROR] Could
not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some
plugins may be not loaded
mag 02 10:45:24 t470 mariadbd[4890]: 2022-05-02 10:45:24 0 [ERROR] Can't
open and lock privilege tables: Table 'mysql.servers' doesn't exist
mag 02 10:45:24 t470 mariadbd[4890]: 2022-05-02 10:45:24 0 [Note] Server
socket created on IP: '0.0.0.0'.
mag 02 10:45:24 t470 mariadbd[4890]: 2022-05-02 10:45:24 0 [Note] Server
socket created on IP: '::'.
mag 02 10:45:24 t470 mariadbd[4890]: 2022-05-02 10:45:24 0 [ERROR] Fatal
error: Can't open and lock privilege tables: Table 'mysql.db' doesn't exist
mag 02 10:45:24 t470 mariadbd[4890]: 2022-05-02 10:45:24 0 [ERROR] Aborting
mag 02 10:45:24 t470 mariadbd[4890]: Warning: Memory not freed: 280
mag 02 10:45:24 t470 systemd[1]: mariadb.service: Main process exited,
code=exited, status=1/FAILURE
mag 02 10:45:24 t470 systemd[1]: mariadb.service: Failed with result
'exit-code'.
mag 02 10:45:24 t470 systemd[1]: Failed to start MariaDB 10.6.7 database
server.
Any clues?