ubuntu下mongodb怎样设置允许远程连接
-
如题所示,操作步骤是怎样的了?
-
@OughlLuo
查看你的 bindIp 配置
----
net.
bindIp
Type: string
Default: All interfaces.
Changed in version 2.6.0: The
deb
andrpm
packages include a default configuration file (/etc/mongod.conf
) that setsnet.bindIp
to127.0.0.1
.The IP address that
mongos
ormongod
binds to in order to listen for connections from applications. You may attachmongos
ormongod
to any interface. When attachingmongos
ormongod
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/)