本帖最后由 frx 于 2021-7-8 13:29 编辑
已解决,在密码中不能出现@,换掉密码就行了
HA升级2021.7后无法连接MySQL,查看RELEASE NOTES发现有个提示:
Recorder
The underlying library that is used for the database connections, has been updated. This fixes a bug, that might be a breaking change for you. If you use an in your database username or password, you will have to adjust your database connection string to use instead.@%40 Database connection strings are considered URLs, thus special charaters need to be encoded. is the URL encoded version of .%40@
现在是这种连接方式: db_url: mysql://home_assistant:[email protected]:3307/home_assistant?charset=utf8mb4 不知道该怎么调整了,数据库大下的传感器也不行 sensor: - platform: sql db_url: mysql://home_assistant:xxxxxxxxxx@192.168.2.10:3307/information_schema queries: - name: hass_db_size query: "select concat(round(sum(DATA_LENGTH/1024/1024),0)) as db_size from TABLES where table_schema='home_assistant';" column: "db_size"
unit_of_measurement: MB
有没有大神能指点下。
|