im running home assistant core, but i think it might be somewhat the same.
install these first: sudo apt install libmariadbclient-dev libssl-dev
install the python mysql client: pip3 install mysqlclient
allow remote login from user om mariadb: sudo mysql GRANT ALL ON *.* TO 'user'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION; FLUSH PRIVILEGES; exit
configure mariadb to listen to all ip addresses: sudo nano nano /etc/mysql/mariadb.conf.d/50-server.cnf bind-address = 0.0.0.0 systemctl restart mariadb
create homeassistant db in mariadb:
i just use heidisql for this
I’m using the hassio operating system where mariaDB is an addon. I can’t install any packages or edit any /etc/mysql/ configuration files for mysql.
I may have chosen the wrong installation option! I’m suspecting there is NO WAY to access the database from another local network host unless I switch the database to another host on the local network.
I don’t know if it still relevant or not but with the addon port 3306 is disabled by default for the host, just add a port number to the addon en restart the addon and you can connect to it from your network