Unable to connect to MongoDB

前端 未结 9 1084
借酒劲吻你
借酒劲吻你 2021-02-02 11:17

I\'ve just installed MongoDB (standard Ubuntu build, not the latest stable) and for some reason I can\'t connect:

Mon Feb  6 03:11:22 Error: couldn\'t connect to         


        
9条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-02 12:05

    You must specify the IP (199.21.114.XX), by running mongo 199.21.114.XX.

    Otherwise, if you want it to listen on localhost as well, you should remove the bind_ip setting in your config file.

    Update Check your firewall config. Since you're connecting to the external IP, it can be configured to block, even from the local box.

提交回复
热议问题