Problem with remote mySQL server

Tried today to install a new mySQl server on my freenas setup and got that running fine, available within the network etc.
Added this to my config with the correct IP to my jail with sql install:

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

Looking in the logs after boot I get this tough:

ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (_mysql_exceptions.OperationalError) (1045, "Access denied for user 'hass'@'****' (using password: NO)") (retrying in 3 seconds)

In the error it displays my IP for the RPI running HASS, not the one I entered in the config? What did I miss?

The IP in the log is the source IP. What this error means is that your MySQL server does not allow user hass to connect from IP without using a password.

This problem can stem from many things, so your best bet is to configure MySQL to allow connections for user hass from all hosts and set a password, then update your db_url to be:

db_url: mysql://hass:[email protected]/hass?charset=utf8
1 Like