MongoDB bind_ip won't work unless set to 0.0.0.0

后端 未结 12 837
遇见更好的自我
遇见更好的自我 2020-12-04 23:43

I really tried, even reinstall the MongoDB.

And it\'s the same to MongoDB bind_ip error: bind() failed errno:99 Cannot assign requested address for socket

It

12条回答
  •  一个人的身影
    2020-12-05 00:21

    This is a notation that only works on Ubuntu: (watch out on spaces, symbols)

    bind_ip=[127.0.0.1,22.33.44.99,88.77.55.66] 
    

    22.33.44.99 - my static ip of server, 88.77.55.66 - my static ip of laptop. That gave me an opportunity to access to mongodb out from internet. Don't forget to add a rule - open port 27017 to ufw.

提交回复
热议问题