I sent in feedback for the documentation page for recorder as well, so hopefully it’ll be reviewed and updated but posting this here as well in case it helps anybody else solve my scenario.
The documentation suggests that you use the following config line for an SSL protected database:
However this seemed to constantly fail thinking that “;ssl=true” was part of the charset:
Error during connection setup: (MySQLdb.OperationalError) (2019, “Can’t initialize character set utf8mb4;ssl=true (path: compiled_in)”) (Background on this error at: Error Messages — SQLAlchemy 1.4 Documentation) (retrying in 3 seconds)
On a hunch I replaced the semicolon with an ampersand to match more common url parameters and also set the MySQL server to only allow SSL connections. This format seems to work:
When I remove the “&ssl=true” section I get the expected failure result (confirming that this parameter isn’t just being ignored):
Error during connection setup: (MySQLdb.OperationalError) (3159, ‘Connections using insecure transport are prohibited while --require_secure_transport=ON.’) (Background on this error at: Error Messages — SQLAlchemy 1.4 Documentation) (retrying in 3 seconds)
I just did an HA update today and now MySQL refuses to allow connection again, idea’s ?
no passwords or host names etc have been changed mysql settings have not been played with
[Warning] Access denied for user ‘homeassistant’@‘homeassistant.fritz.box’ (using password: YES)
Core2024.3.0
Supervisor2024.02.1
Operating System12.0
Frontend20240306.0
and after about 100 restarts using quick and full trying to change config combinations and even full power off / on , gave up and rolled back to a part backup from 10 hours ago
Core2024.2.5
Supervisor2024.02.1
Operating System12.0
Frontend20240207.1
and it connected again somethings up with Core2024.3.0
I had the same experience upgrading to core2024.3.0, but much like MasterCATZ, rolling back to 2024.2.5 seemed to restore external SQL connections and rolling forward to the next version 2024.3.0b0 introduced the same error state as 2024.3.0:
Error during connection setup: (MySQLdb.OperationalError) (3159, ‘Connections using insecure transport are prohibited while --require_secure_transport=ON.’) (Background on this error at: Error Messages — SQLAlchemy 2.0 Documentation) (retrying in 3 seconds)
Feedback on the documentation was ultimately closed without being addressed due to volume and being stale:
Also, for anybody coming to this thread trying to find a fix who might fumble through Linux (like myself), you can rollback ha core with the command:
ha core update --version 2024.2.5