ubuntu下mongodb怎样设置允许远程连接


  • 註冊用戶

    如题所示,操作步骤是怎样的了?


  • Lv 1

    @OughlLuo

    查看你的 bindIp 配置

    ----

    net.bindIp

    Type: string

    Default: All interfaces.

    Changed in version 2.6.0: The deb and rpm packages include a default configuration file (/etc/mongod.conf) that sets net.bindIp to 127.0.0.1.

    The IP address that mongos or mongod binds to in order to listen for connections from applications. You may attach mongos or mongod to any interface. When attaching mongos or mongod to a publicly accessible interface, ensure that you have implemented proper authentication and firewall restrictions to protect the integrity of your database.

    To bind to multiple IP addresses, enter a list of comma separated values.

    ----

    詳細參考 [Configuration File Options — MongoDB Manual 3.4](https://docs.mongodb.com/manual/reference/configuration-options/)


登录后回复
 

与 萌阔论坛 的连接断开,我们正在尝试重连,请耐心等待