Recorder not connecting to MySQL DB after reboot of NAS

After I have updated from 2021.7.2 to 2021.7.4 and following performed a restart of the HomeAssistant I am having trouble to connect to the external recorder DB.
When setting it up I followed these instructions

db_url: mysql://user:[email protected]:3307/hass?charset=utf8

The MySQL DB is running on a Synology NAS with PHP My Admin active.
Glad to provide any further information, if anyone can point me in the right direction.

I saw a similar thread recently.
I think the 3307 port is blocked by default by the Synology firewall. You have to open it.

The NAS is not accessible from remote. As such I had the NAS firewall disabled. I am not sure if this is smart, but prior to the HASS Update, the recorder was working correctly. I may notice, that I have also rebooted the NAS, I am not sure if this caused any side effects.

if you used 3rd party mysql apps you will be able to test it and if you used mysql it should be 3306 and not 3307 (this I believe for MariaDB?)

I was following these instructions

Looking through phpMyAdmin I stumbled upon the priviledges for the DB user I created for Home Assistant. I know it may not be within the focus of this forum, but maybe someone does have the expierience to support.
Not sure if anything has changed upon reboot of the NAS, but currently it seems that none are set.


For now I granted all. And following a reboot of Home Assistant the recorder seems to be working again.
Could someone specify if really all priviledges are required?

Edit: Btw I appreciate all the responses. Very great support in this forum and surprised how quick replies fly in. :slight_smile:

It’s actually in the instructions you followed:

For good measure I also set Global Priviledges - Check All

And yes, that’s the way to go, grant all privileges to a specific user to the HA db.
That user must be able to create and alter tables.

Yes it is and potentially I did follow this step at the time of setting it up, but somehow these settings got lost.
I was just questioning if the priviledges under “Administration” are all applicable, certainly home assistant must not be able to create other users.

Ah, no, indeed. I was confused by phpmyadmin.

The non-gui way is to do a

GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'%';
FLUSH PRIVILEGES;

Ah I just saw that the screen shot from phpmyadmin is taken from the user general rights.
There are separate pages for the users rights regarding specific databases, which have been activtated the whole time…
Anyway, the recorder at the moment seems to work. So I leave everything as is.