Cant connect to mysql

I’m trying to connect a mysql database as grafana data source but I get: connect: connection refused . Grafana and mysql server both are running over Ubuntu server VM (vmware) and I can access to Grafana (which is installed as docker) using my VM IP address . Database is running in the virtual machine localhost because I insert into it datas.

I’ve tryed with localhost:3306 and with , I’ve created a user for grafana with the privileges and flush it.

I have the port 3306 open in my NAT router for localhost and but no works.

Can you help me? Thanks.

Any errors in the Grafana server logs that provide more details? Can you see if it is an authentication problem or a networking problem?

It was a docker error…I installed grafana without docker in my Ubuntu and it’s working…I read about docker port configuration but couldn’t fix.
It workes so fine.

1 Like