Massive errors in MariaDB docker log file

I recognized a very large log file in my /var/lib/docker/containers directory and identified it to be the homeassistants mariaDB containers log. It writes roughly 6000 lines per hour.
homeassistant: v2023.4.4
mariaDB: v10.9.3
docker: v20.10.17
ubuntu: v22.04.2

Below some of those repeating entries.
How could I find the root cause and repair?

{"log":"2023-04-13 23:23:38 6 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'hist_type' at position 9 to have type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'), found type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB').\n","stream":"stderr","time":"2023-04-13T21:23:38.135774922Z"}
{"log":"2023-04-13 23:23:38 6 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).\n","stream":"stderr","time":"2023-04-13T21:23:38.135921883Z"}
{"log":"2023-04-13 23:23:40 9 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'hist_type' at position 9 to have type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'), found type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB').\n","stream":"stderr","time":"2023-04-13T21:23:40.146576403Z"}
{"log":"2023-04-13 23:23:40 9 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).\n","stream":"stderr","time":"2023-04-13T21:23:40.14668768Z"}

Seems an issue with the upgrade…have a look here
How to fix docker MariaDB correct definition of table mysql.column_stats: expected column ‘hist_type’ at position 9… - TechOverflow

I have no clue what this tbale does, it is not a db for the HA data and with me it is fully empty

3 Likes

I fired docker-compose exec homeassistant-db mysql_upgrade -uroot, entered my MariaDB root password, waited some minutes … and no more errors in the log.

@vingerha: Thanks a lot.