[英]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
. 我正在尝试连接一个mysql数据库作为grafana数据源,但我得到:
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
. Grafana和mysql服务器都运行在Ubuntu服务器VM(vmware)上,我可以使用我的VM IP地址
192.168.1.130:3000
访问Grafana(安装为docker)。 Database is running in the virtual machine localhost because I insert into it datas. 数据库正在虚拟机localhost中运行,因为我插入了数据。
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. 我尝试过
localhost:3306
和192.168.1.130:3306
,我已经为grafana创建了一个具有权限的用户并刷新它。
I have the port 3306 open in my NAT router for localhost
and 192.168.1.130
but no works. 我在我的NAT路由器中为
localhost
和192.168.1.130
打开了端口3306,但没有用。
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. 这是一个docker问题,我已经阅读了同样的问题,它是关于docker ports的东西......所以我已经通过linux方式安装了Grafana并且它现在正常工作。
Fix docker ports seems hard and I dont understand...if someone can fix it tell me just to know and learn. 修复docker端口似乎很难,我不明白...如果有人能解决它告诉我只是知道和学习。
Thanks 谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.