无法从本地robomongo连接Google Cloud的MongoDB [英] Could not connect MongoDB of Google Cloud from local robomongo

查看:145
本文介绍了无法从本地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:

这篇关于无法从本地robomongo连接Google Cloud的MongoDB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆