Mariadb errors after update

Today I updated HomeAssistant and MariaDB (both in docker) to the latest version, and now I have errors in MariaDB, related to stats of HA it seems:

2022-05-24 21:29:46 13 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).

2022-05-24 21:29:46 13 [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').

HA seems to work normally, nothing special in the logs.
HA was updated from 2022.5.4 to 2022.5.5
MariaDB was updated from 1:10.7.3+maria~focal to 1:10.8.3+maria~jammy

Does anyone knows what is wrong and how to fix this?

Do you have any issues in Developer Tools > Statistics?

Thanks for the hint!
There were only a couple of old entities wit issues. I solved them (removed), restarted MariaDB, restarted HA, but still the same errors :frowning:

I connected to the database with mysql, but somehow I do not have access???

MariaDB [(none)]> desc mysql.column_stats;
ERROR 1142 (42000): SELECT command denied to user 'homeassistant'@'localhost' for table 'column_stats'
MariaDB [(none)]>

What is this table " column_stats"???

fixed this with
mysql_upgrade --user=root --password=<root_pwd>
on the commandline in docker

dont know why anyway.

4 Likes

adding this to your docker compose helps

mariadb:
    environment:
      MARIADB_AUTO_UPGRADE: "1"
      MARIADB_INITDB_SKIP_TZINFO: "1"
8 Likes

What does this do?