MariaDB doesnt connect to Recorder

Hi,

I am a newby/noob with Home Assistant, I started to play with it about 3 weeks ago. I installed it on a HP 601 thin client. And I am happy with it. Very surprised with its possibilities and ease of use. Had a lot of integrations and even some custom integrations as SolarEdge Modbus working fine. Played a bit with the dashboards, also fine.
So I decided to use this as my platform and started to try to make t as stable and futureproof as possible. It installed several ‘to do’ plugins and Samba Backup for automatic backups to my Fritzbox Nas etc.
I also wanted to install MariaDb and Fluxdb or a more reliable database and there problem happens…
I didn’t get MariaDb connecting to Recorder and I hope to get help from you.

What I did:

  • I installed MariaDb. → Ok

  • Changed MariaDb config:
    databases:

  • homeassistant
    logins:

  • password: PASSWORD: more than 8 character, more than 1 upperace, lowercase, figures and symbols
    username: homeassistant
    rights:

  • database: homeassistant
    username: homeassistant

  • Changed config,yaml:

Loads default set of integrations. Do not remove.

default_config:

Load frontend themes from the themes folder

frontend:
themes: !include_dir_merge_named themes

Text to speech

tts:

  • platform: google_translate
    automation: !include automations.yaml
    script: !include scripts.yaml
    scene: !include scenes.yaml

#Change SQlite to MariaDB
recorder:
db_url: mysql://homeassistant:PASSWORD@core-mariadb/homeassistant?charset=utf8mb4 (didn’t use Secret yet)

indent before db_url is 2 spaces

Started MaraDB
Restarted Homeassistant (Option Restart System)

Results:

  • MariaDB is running
  • Recorder doesn’t connect
    Logs:
    Logger: homeassistant.setup
    Source: setup.py:205
    First occurred: 22:01:59 (4 occurrences)
    Last logged: 22:02:08
    • Setup failed for logbook: (DependencyError(…), ‘Could not setup dependencies: recorder’)
    • Setup failed for history: (DependencyError(…), ‘Could not setup dependencies: recorder’)
    • Setup failed for energy: (DependencyError(…), ‘Could not setup dependencies: history, recorder’)
    • Setup failed for default_config: (DependencyError(…), ‘Could not setup dependencies: energy, history, logbook’)
    And it is telling me in the notifications that:
    Invalid Configuration, the same problem

Pls give some guidance to make this work

Tnks
Ben

Rollback, startover, make sure you doit correct, but most of all understand why/whether you want/need it
And next time , post “logfile” regarding relevant errors, AFTER, you also tried loglevel-Debug

Tnx, i will start it over.

I decided to install MariaDb after reading lots of negative posts about SQlite. And now, as limited data is logged, i will not loose a lot if history.

I dont understand you remarks about the log and debug log. Pls explain so i can follow the rules.

Grz

if you have problems, seeing errors in your logs, but can’t figure out what’s wrong, you should post i.e logfiles, or relevant parts of log-messages, deeper analyses can/will be revealed if you enable Debug.

You do that in your configuration.yalm

i.e.

logger:
  default: debug

You use this only for troubleshooting, should be disabled after, as it generates larger log-files

thou to be honest, i don’t recommend getting into mariadb, with your 3 weeks background in HA, start to learn about ha first, and if you then/later feel a need to switch to another DB, read more about this in specific, Dont just jump on a red Vagoon, because you think they are better

Tnx

fair enough. One of the reasons why I want to do it now, is that I don’t want to loose my history afther a year. Otherwise I would stick to QQlite for now. You don’t seem to be very positive about MariaDB, can you explain why?

i have actually have my thoughts about going for mariadb my self,and have even tried influx, in combination with grafana
Mariadb would in my case then be an external DB, and on another drive than HA, … having mariadb as add-on in same environment as ha, don’t give much more “options” than current sqlite, sqlite is fast and easy as it is now
so it depends upon your needs and purpose, but trust me, if you just started with HA, and already got into trouble, trying to install Mariadb, i really think you should focus on learning HA, your Data, you can always backup, so you eventually can incorporate mariadb, And yes you need it(or something) if you wanna keep years and years of data