Corrupted MariaDB after Homeassistant OS upgrade

Hi,

I upgraded to HomeAssistant OS 2023.1.7 today and directly had a corrupted database. Fantastic. I don’t seem to be the only one who frequently runs into that problem (see other posts in the forum). When will this finally be fixed?

I didn’t know how to fix it so, as a consequence, I now lost one year of usage data and logs. Fantastic again.

Even worse, though: Even uninstalling and reinstalling MariaDB plugin doesn’t help. Now I see the following error message in the log - no idea what’s going on. Fantastic.

Any idea how I can at least get my system back to normal? Thanks a lot in advance!

services-up: info: copying legacy longrun mariadb (no readiness notification)
services-up: info: copying legacy longrun mariadb-lock (no readiness notification)
[23:03:15] INFO: Create a new mariadb initial system
Killed
[22:03:18] WARNING: Halt add-on
[23:03:18] INFO: Using existing mariadb initial system
[23:03:18] INFO: Starting MariaDB
230123 23:03:19 mysqld_safe Logging to '/data/databases/mariadb.err'.
230123 23:03:20 mysqld_safe Starting mariadbd daemon with databases from /data/databases
230123 23:03:20 mysqld_safe Starting mariadbd daemon with databases from /data/databases
2023-01-23 23:03:20 0 [Note] /usr/bin/mariadbd (server 10.6.8-MariaDB) starting as process 303 ...
2023-01-23 23:03:20 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
2023-01-23 23:03:20 0 [Note] InnoDB: Number of pools: 1
2023-01-23 23:03:20 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2023-01-23 23:03:20 0 [Note] mariadbd: O_TMPFILE is not supported on /var/tmp (disabling future attempts)
2023-01-23 23:03:20 0 [Note] InnoDB: Using Linux native AIO
2023-01-23 23:03:20 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2023-01-23 23:03:20 0 [Note] InnoDB: Completed initialization of buffer pool
2023-01-23 23:03:20 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=10317,10317
2023-01-23 23:03:21 0 [Note] InnoDB: Doublewrite buffer not found: creating new
2023-01-23 23:03:21 0 [Note] InnoDB: Doublewrite buffer created
2023-01-23 23:03:21 0 [Note] InnoDB: 128 rollback segments are active.
2023-01-23 23:03:21 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2023-01-23 23:03:21 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2023-01-23 23:03:21 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2023-01-23 23:03:21 0 [Note] InnoDB: 10.6.8 started; log sequence number 10329; transaction id 4
2023-01-23 23:03:21 0 [Note] InnoDB: Loading buffer pool(s) from /data/databases/ib_buffer_pool
2023-01-23 23:03:21 0 [Note] InnoDB: Cannot open '/data/databases/ib_buffer_pool' for reading: No such file or directory
2023-01-23 23:03:21 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-01-23 23:03:21 0 [ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not loaded
2023-01-23 23:03:21 0 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
2023-01-23 23:03:21 0 [Note] Server socket created on IP: '0.0.0.0'.
2023-01-23 23:03:21 0 [Note] Server socket created on IP: '::'.
2023-01-23 23:03:21 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.db' doesn't exist
2023-01-23 23:03:21 0 [ERROR] Aborting
Warning: Memory not freed: 280
230123 23:03:22 mysqld_safe mysqld from pid file /data/databases/core-mariadb.pid ended