Access MariaDB from other computer

Hi All!

I’ve got Hassio on my Pi3 working fine, but I would like to acces the MarioDB from another computer. (So I could play with the sensor data like humidity etc.)

But with what free program can this be done? I can connect with Putty, but basically all I want to do is connect with the database, look up the correct sensor and copy this data to Excel or whatever for further analysis.

Who is the one who can point me in the right direction?!

Kind regards,

Eltjo

Perhaps hassio is locking the db to localhost, otherwise you can connect to it using phpmyadmin or similar. I gave a server in germany with mariadb and connect to it from my laptop in Cyprus. But as said, hassio is special

Maybe this helps

Ok, managed to install Squirrel, but when I try to connect I get this message:

Hassio: Host '192.168.1.134' is not allowed to connect to this MariaDB server
class java.sql.SQLException: Host '192.168.1.134' is not allowed to connect to this MariaDB server

I try to connect with: jdbc:mysql://192.168.1.111:3306/homeassistant

In Hassio I have the following data from MariaDB:

  "rights": [
    {
      "username": "hass",
      "host": "homeassistant",
      "database": "homeassistant",
      "grant": "ALL PRIVILEGES ON"

Any hints…?

Did you ever solve this? I have the same issue.

Hi, sorry for the late reply. But no, never solved.
I changed to InfluxDB and Grafana, maybe this is an option for you too?

Strangely it worked from a Mac SQL client fine but could never get it to work from a hassio command line.

Solved:
You must add “3306” as entryport to the 3306 of the docker.

7 Likes

Workes for me. I can then access the MariaDB with an external client (HeidiSQL) via HA-IP, port 3306, username and password.

3 Likes

I’m facing the same issue.
I have HAOS running on UTM on M1 with a network bridge, exposing everything to the local network via IP or local DNS.
The problem is I can’t connect to MariaDB using DataGrip; it shows ‘Connection refused.’
Surprisingly, even when I SSH, I can’t find or connect to MariaDB. :disappointed:


Even when if all privileges are granted to my user

Ok found the problem port 3306 was blocked by the addon.

Did you manage to solve it in the end?

Yeah, you just need to expose port in add-on:

What I’m still trying to figure out is why mysql CLI connect without problems but when I try to connect via DataGrip or DBeaver I see an error in logs:

1 Like

After some testing, I was able to connect on default settings via Table Plus I belive there are some incompatibility in db drivers in DataGrip and DBeaver