MariaDB event scheduler on, make it persistent?

I am running (at least that’s how I installed it some years ago, don’t know how it’s named now) hassio in docker on raspbian.
I use MariaDB (official add-on) as the default database (configured in ‘recorder’ in configuration.yaml) and manage it with phpMyAdmin (Home Assistant Community Add-on).

I want MariaDB to run some queries every night, which is a build in feature with the ‘event scheduler’, but you need to enable the event scheduler with the SQL statement
SET GLOBAL event_scheduler = ON

It works until I reboot my HA server, then I need to issue that statement again. In a ‘normal’ installation of MariaDB I could add a line to the configuration file ‘my.cnf’:
event_scheduler=ON

But I have no access to or can not locate ‘my.cnf’.

Does anyone know where ‘my.cnf’ is located or if there is another method to enable the event scheduler permanently in MariaDB when ran as an HA add-on?

1 Like