I’ve recently reinstalled everything on my Raspberry, including home assistant. I took the time to clean up and restructure some things, and now everything is running in a single docker-compose monstrocity, which works quite well.
One of the containers is for MariaDB, which is intended to replace the built-in database. However, I can’t seem to get it to work, for some reason; Home Assistant keeps saying it can’t connect to it.
My docker-compose for MariaDB:
mariadb:
restart: unless-stopped
container_name: mariadb
environment:
MYSQL_ROOT_PASSWORD: secretpasswordissecret
MYSQL_DATABASE: home_db
MYSQL_USER: pi
MYSQL_PASSWORD: secretpasswordissecret
volumes:
- ‘/home/pi/mariadb/msql/:/var/lib/mysql’
- ‘/home/pi/mariadb/conf/:/etc/mysql/conf.d’
ports:
- 8080:8080
- 3306:3306
image: jsurf/rpi-mariadb
And in my configuration in Home Assistant (just for the recorder:
recorder:
purge_keep_days: 90
db_url: mysql://pi:[email protected]:3306/home_db?charset=utf8
include:
domains:
- sensor
- switch
- media_player
exclude:
entities:
- sensor.last_boot
- sensor.date
Am I missing something?