How to connect to MongoDB EC2 instance

前端 未结 6 767
失恋的感觉
失恋的感觉 2020-12-31 02:05

we have an EC2 MongoDB 2.4 instance from Amazon MarketPlace. when i try to access it from my computer using the mongo command like so:

mongo xx-xx-xx-xx-xx.c         


        
6条回答
  •  情歌与酒
    2020-12-31 02:13

    Since mongod is running and working on the remote instance, you can access your MongoDB content via

    mongo xx-xx-xx-xx-xx.compute-1.amazonaws.com or mongo machine_elastic_IP

    Before that you need to open Inbound port for that machine.By-default port 27017 is closed for external world.

    For more info refer : http://docs.aws.amazon.com/gettingstarted/latest/wah/getting-started-security-group.html

提交回复
热议问题