New to Home Assistant - currently running via a Docker container.
I’ve got a lot of data currently stored in a MySQL database for a variety of sensors - many homemade that I want to keep running as they are.
I want to access this MySQL data from HA.
No matter what I try I can’t get the SQL Integration to work - I constantly get the “SQL Query invalid” error - and who knows why the default behaviour is to clear all the fields on error, very annoying!
The MySQL db is running on the system the container is running.
I’m using the following parameters - can someone point me in the right direction of how to sort this?
Feel like this should be simple but seem to be wasting a lot of time!
Name - 433temp_3
Database URL - mysql://xxxx:[email protected]/433temp?charset=utf8mb4
(local IP of system running docker and mysql)
I’ve also tried - mysql://xxxx:[email protected]/433temp?unix_socket=/var/run/mysqld/mysqld.sock&charset=utf8mb4
Column - temperature
Select Query - SELECT * FROM 433temp_3 ORDER BY unixtime DESC LIMIT 1
If I input this query in PHPMyAdmin it works fine and gives the correct result.