简体   繁体   English

如何在EC2服务器的SlamData中与mongodb连接

[英]How can i connect with mongodb in SlamData for my EC2 server

I can successfully connected with mongodb on SlamData but for my localhost. 我可以成功连接SlamData上的mongodb,但可以连接到我的本地主机。 Now I have a mongodb database on my EC2 server that database i want to connect in Ec2 then How can I ? 现在我在EC2服务器上有一个mongodb数据库,该数据库我想在Ec2中连接,那我该怎么办?

在此处输入图片说明

I know username and password. 我知道用户名和密码。 What should be a host and port? 主机和端口应该是什么?

If you are running Slamdata on your host and want to connect to MongoDB running on a remote EC2 host. 如果您在主机上运行Slamdata,并且想连接到在远程EC2主机上运行的MongoDB。

Then apart from the username and password, the host is the Public IP or host FQDN [ec2-xxxxxxx], port is 27017. For this check if your mongos is running and binding on 0.0.0.0. 然后,除了用户名和密码外,主机是公共IP或主机FQDN [ec2-xxxxxxx],端口是27017。为此,请检查您的mongos是否正在运行并绑定到0.0.0.0。 If it is binding to 127.0.0.1, you cannot connect remotely 如果绑定到127.0.0.1,则无法远程连接

Also check you AWS security group for EC2 and see that the port 27017 is open for your IP or in general to all [0.0.0.0] (this is NOT recommended!!!) 还要检查您的EC2的AWS安全组,并查看端口27017是否已为您的IP或所有[0.0.0.0]通用端口打开(不建议这样做!!!)

You can also review the FAQ on docs.slamdata.com located here . 您还可以查看在位于docs.slamdata.com的常见问题在这里

Provides step-by-step troubleshooting for connecting to cloud-hosted MongoDB servers. 提供逐步的故障排除,以连接到云托管的MongoDB服务器。

Additionally, the Path value refers to path inside of SlamData rather than the operating system path. 此外, Path值引用SlamData内部的路径,而不是操作系统路径。 For instance entering a value of aws1 results in a query path similar to the following, assuming you have a databased named demo and a collection named coll1 : 例如,假设您有一个名为demo的数据库和一个名为coll1的集合,则输入aws1的值将导致类似于以下内容的查询路径:

SELECT * FROM `/aws1/demo/coll1` 选择* FROM`/ aws1 / demo / coll1`

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在我的 windows 到安装在亚马逊 ec2 实例上的 mongodb 中连接到 robomongo? - How can i connect to robomongo in my windows to mongodb installed on amazon ec2 instance? 无法通过 NodeJs 连接到我的 MongoDB EC2 实例 - Can't connect to my MongoDB EC2 instance via NodeJs 如何设置SSH隧道以连接到驻留在AWS EC2服务器上的ElasticSearch和MongoDB? - How to setup SSH tunnel to connect to my ElasticSearch and MongoDB residing on AWS EC2 server? 如何连接共享主机上的godaddy网站以在Amazon EC2上使用mongodb数据库? - How can I connect a godaddy site on shared hosting to use a mongodb db on amazon ec2? 无法连接到在 EC2 上运行的 Mongodb - Can't connect to Mongodb running on EC2 如何连接到MongoDB EC2实例 - How to connect to MongoDB EC2 instance 如何将 mongodb(安装在 ec2 上)连接到 Robomongo? - How to connect mongodb(installed on ec2) to Robomongo? 无法使用AWS DMS连接到VPC下的ec2实例内的MongoDB作为源端点 - Can't connect to my MongoDB inside ec2 instance under VPC as source endpoint using AWS DMS 如何在EC2环境中使用node-mongodb-native在Node.js服务器上设置MongoDB? - How can I set up MongoDB on a Node.js server using node-mongodb-native in an EC2 environment? 连接到Amazon EC2上托管的mongoDb Bitnami服务器 - Connect to mongoDb Bitnami server hosted on Amazon EC2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM