无法从本地robomongo连接Google Cloud的MongoDB
我将我的项目和数据库托管在Google云平台中.两者都运行良好.问题是我们需要在VM外部访问mongo实例.我们试图使用IP(130.211.50.141)和默认端口27017从本地robomongo 0.8.3平台从外部访问实例.我们能够ping通IP 130.211.50.141,但是在尝试连接时,它无法正常工作.最后,我还没有使用robomongo,而是使用控制台通过IP(主机)连接服务器,但失败了.
I host my project and db in Google cloud platform. Both are running well. The problem is that we need to access the mongo instance outside VM. We was trying to access the instance externally form my local robomongo 0.8.3 platform using the IP(130.211.50.141) and default port 27017. We are able to ping the ip 130.211.50.141 , but when trying to connect, it is not working. Lastly, Instead of robomongo, I also use console to connect the server using the IP (host) and failed.
任何帮助将不胜感激.
Any help will be appreciated.
您可以通过以下两种方法从Robomongo中访问GCC(Google云计算)MongoDB.我正在使用SSH连接到我的GCC MongoDB.
There is a couple of ways you can get access to your GCC(Google Cloud Compute) MongoDB from your Robomongo. I'm using SSH to connect to my GCC MongoDB.
1,确保在~/.ssh/authorized_keys
中的mongodb实例中具有ssh密钥.如果没有,则将您的密钥添加到其中.
1, Make sure you have your ssh key in your mongodb instance located in ~/.ssh/authorized_keys
. If not, added your key into it.
2,创建连接:
3,设置您的SSH连接:
3, Set your SSH connection: