I am trying to setup MariaDB with Hassbian and am currently struggling with the configuration.
I installed MariaDb following this:
sudo curl -o /opt/hassbian/suites/install_mariadb.sh https://raw .githubusercontent.com/home-assistant/hassbian-scripts/dev/package/opt/hassbian/ suites/install_mariadb.sh && sudo hassbian-config install mariadb
The system indicates that:
No database or database user is created during this setup and will need to be created manually.
Consequently I followed these steps:
$ sudo mysql -u root -p
$ CREATE DATABASE homeassistant;
$ CREATE USER ‘homeassistantuser’ IDENTIFIED BY ‘password’;
$ GRANT ALL PRIVILEGES ON homeassistant.* TO ‘homeassistantuser’;
$ FLUSH PRIVILEGES; $ exit
And added following information in my configuration.yaml
recorder: purge_interval: 2 purge_keep_days: 30 db_url: mysql://homeassistantuser:[email protected]/homeassistant
But I get an error message that recorder is not working (obviously I adapted homeassistantuser and password to my liking).
Any idea what I did wrong?