I have been trying to get this working on and off for a couple of months now. I can never get the recorder component to work on an MySQL DB hosted on another machine on my network.
Is this a limitation of Hass.io? Is there a work around?
For example, here is my db_url: mysql://hass:[email protected]/homeassistant?charset=utf8
Here is the error message I am getting. Even though I am specifying the IP it looks like it is defaulting to localhost?
Error during connection setup: (_mysql_exceptions.OperationalError) (1045, "Access denied for user 'hass'@'hassio.localdomain' (using password: YES)") (Background on this error at: http://sqlalche.me/e/e3q8) (retrying in 3 seconds)
This means that the user âhassâ@âhassio.localdomainâ (which is the user you entered in the db_url) has no access to the mysql server.
You have to look on your mysql server to give the user access and create the database âhomeassistantâ
Yep, thanks! you would think that having looked at this on and off for a while I would have noticed that I had a setting setup incorrectly on the DB side. But no. Thanks for the quick response!
Thanks! Yeah I have used that thread before to originally set up a external DB before i migrated to Hassio, that is what was so perplexing to me. I knew this worked for me before so I guess i jumped to the conclusion that is was a hassio issueâŠ
VDRainerj.assuncaolightbulb0413
How did you resolve this problem?
I have error message: (1005, 'Can\'t create table hass_db.events (errno: 13 "Permission denied")')
whch suggest that user donât have permission to db but I can log in by HeidiSQL to this db with the same login and passowrd. How to add proper permission to this user?
edit: OK. I had problem with privileges on /var/lib/mysql/ha_db
Just chown mysql:mysql fixed it. Sorry for the problem.
iâve got an similar problem. I canât connect to my sql database on a different pi.
I created a new database called ha and created also an user with permissions for the specific database.
mit config:
Error during connection setup: (MySQLdb._exceptions.OperationalError) (2002, "Can't connect to MySQL server on '192.168.178.91' (115)")
(Background on this error at: http://sqlalche.me/e/e3q8) (retrying in 3 seconds)
The IP-Adress is correct and the port as well.
i tried to google the error, but found no results. Maybe someone can help?
Im running hass.io.
I have Hassio on raspberry Pi and I also wanted to use an external database to record hassioâs details.
I have QNAP NAS in my local LAN and I run MySQL server where I created database named âhomeassistantâ and created USER named âuserâ with all privileges to the âhomeassistantâ database.
Creating mySQLâs user you have to define ip_address of your hassio (ie. 192.168.1.37) and password.
Then configuration.yaml looks like following:
I use Raspbian on my Pi with mySQL running.
The Problem was, that the mysql database only accepted data from localhost. I had to change the bind_adress in the config files. If you Google that, you will find the steps to configure mysql in that way, that it as well accept data from other hosts than localhost.
I had an issue about Hass complaining about not being able to set up the connection with this character set (âutfâ). Turns out the documentation was flawed again as it should read âutf8â. Now it works.
Why do developers insist on releasing half-baked documentation and wasting millions of hours of userâs time?