No history available: MySQLdb.OperationalError) (2002, “Can’t connect to MySQL server on ‘core-mariadb’ (115)

Since 31-1 Recorder can’t start up, cause HA can’t connect to the MariaDB server. There are a few (closed) older topics on this. The offered solutions there (uninstall, reinstall, using IP instead of mariacore-db in the login url ) don’ t work for me.

My installation:
Hassio on an Intel NUC.
Home Assistant 2023.2.0
Supervisor 2023.01.1
Operating System 9.5
Frontend-versie: 20230201.0 - latest
Young installation (since beginning of January '23). Key integrations: Slimmemeter+ (energy monitoring), ZWave UI (a few switches), Zigbee.

This error seemingly appeared out of nothing overnight - i.e. it didn’t follow on an update, new integration or other intervention.

Help would be much appreciated.

Known related topics:

(solution seems not applicable for me).

Error log:

The filesize platform for the sensor integration does not support platform setup. Please remove it from your config.

15:42:19 – (FOUT) Sensor
Setup failed for recorder: Integration failed to initialize.

15:42:14 – (FOUT) setup.py
Error during connection setup: (MySQLdb.OperationalError) (2002, “Can’t connect to MySQL server on ‘192.168.1.39’ (115)”) (Background on this error at: Error Messages — SQLAlchemy 1.4 Documentation) (retrying in 3 seconds)

15:42:11 – (FOUT) recorder - bericht kwam voor het eerst om 15:41:43 en verschijnt 10 keer
Setup of recorder is taking over 10 seconds.

15:41:53 – (WAARSCHUWING) runner.py

Update & One Question:

  1. As suddenly the database stopped working, it started yesterday after one week due to a restart (I restarted many times last week). Could the fact that I installed the phpMyAdmin add on have made a difference? In the add on the database was connected, although no tables were found…
    My former data of 3 weeks is gone, but it works

  2. My log shows an error that it did before: coud it be related? On filesize platform:
    What do I have to do to solve this issue?

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:202
Integration: Sensor (documentation, issues)
First occurred: 6 februari 2023 om 21:42:50 (1 occurrences)
Last logged: 6 februari 2023 om 21:42:50

The filesize platform for the sensor integration does not support platform setup. Please remove it from your config.

The error from the post above suddenly, without clear cause, re-appeared. The automatisations work, but the recorder doesn’t, and HA is not approachable via the url, it times out (local url as well full ip).
I think HA is actually only for the very IT savvy people. I know my bit of computers, would say I’m quite capable, much more than basic, and am very eager to learn, but this learning curve is way, way too steep. These types of errors are apparently even for this savvy community ‘too much’. Makes me a bit sad.

1 Like

In addition, does the following log of MariaDB give a clue about the cause? Any MariaDB experts?

s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun mariadb (no readiness notification)
services-up: info: copying legacy longrun mariadb-lock (no readiness notification)
[20:02:28] INFO: Using existing mariadb initial system
[20:02:28] INFO: Starting MariaDB
230326 20:02:28 mysqld_safe Logging to '/data/databases/mariadb.err'.
230326 20:02:28 mysqld_safe Starting mariadbd daemon with databases from /data/databases
230326 20:02:28 mysqld_safe Starting mariadbd daemon with databases from /data/databases
2023-03-26 20:02:28 0 [Note] /usr/bin/mariadbd (server 10.6.10-MariaDB) starting as process 250 ...
2023-03-26 20:02:28 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
2023-03-26 20:02:28 0 [Note] InnoDB: Number of pools: 1
2023-03-26 20:02:28 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2023-03-26 20:02:28 0 [Note] mariadbd: O_TMPFILE is not supported on /var/tmp (disabling future attempts)
2023-03-26 20:02:28 0 [Note] InnoDB: Using Linux native AIO
2023-03-26 20:02:28 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2023-03-26 20:02:28 0 [Note] InnoDB: Completed initialization of buffer pool
2023-03-26 20:02:28 0 [ERROR] InnoDB: Invalid log block checksum. block: 31677024 checkpoint no: 2839 expected: 1774187422 found: 3986230530
2023-03-26 20:02:28 0 [ERROR] InnoDB: Missing FILE_CHECKPOINT at 16218636041 between the checkpoint 16214577623 and the end 16218635776.
2023-03-26 20:02:28 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2023-03-26 20:02:28 0 [Note] InnoDB: Starting shutdown...
2023-03-26 20:02:29 0 [ERROR] Plugin 'InnoDB' init function returned error.
2023-03-26 20:02:29 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2023-03-26 20:02:29 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-03-26 20:02:29 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2023-03-26 20:02:29 0 [ERROR] Aborting
230326 20:02:29 mysqld_safe mysqld from pid file /data/databases/core-mariadb.pid ended```

Did you ever figure any of this out? I think I’m having a similar issue, and my Home Assistant is basically rebooting itself every half hour or so. Web UI is incredibly slow and not everything is loading. I updated earlier this afternoon but the issues didn’t start until several hours later.

This helped me:

In the file /etc/mysql/mariadb.conf.d/50-server.cnf (Raspi-os 2021-03-04 with MariaDB installed), you should replace the line "bind-address = 127.0.0.1" (localhost) by "bind-address = 0.0.0.0" (all). After, you should restart your MySQL server : $ sudo service mariadb restart