简体   繁体   中英

I can't connect grafana with mysql database running in the same ubuntu server VM

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 192.168.1.130:3000 . Database is running in the virtual machine localhost because I insert into it datas.

I've tryed with localhost:3306 and with 192.168.1.130:3306 , 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 192.168.1.130 but no works.

Can you help me? Thanks.

It's a docker problem, I've read about the same problem and it's something about docker ports...so I've installed Grafana by the linux way and it work right now.

Fix docker ports seems hard and I dont understand...if someone can fix it tell me just to know and learn.

Thanks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM