Cannot connect to mongodb using machine ip

前端 未结 5 1342
没有蜡笔的小新
没有蜡笔的小新 2020-12-01 14:48

Installed Mongo using homebrew. If I type mongo on shell, it gets connected to test. But when I type the ip address

5条回答
  •  遥遥无期
    2020-12-01 15:20

    No In fact, if you want to access the rest interface from any ip, you needn't set bind_ip to 0.0.0.0 in the mongod.conf, you only comment or remove the configuration item from it, as similar as

    #bind_ip=127.0.0.1
    

    And then, restart your service, you can find that you can access the rest service from the 28017 port from your machine

提交回复
热议问题