我已经在虚拟机中安装了mongodb。谁能告诉我如何配置mongodb以便从我的本地机器远程连接它。
请找到配置文件:
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# Where and how to store data.
storage:
dbPath: C:\MongoDB\db
journal:
enabled: true
# engine:
# mmapv1:
# wiredTiger:
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: C:\MongoDB\log\mongod.log
# network interfaces
net:
port: 27017
bindIp: 127.0.0.1
#processManagement:
#security:
#operationProfiling:
#replication:
#sharding:
## Enterprise-Only Options:
#auditLog:
#snmp:是否需要使用虚拟机IP地址来代替bindIp?
耽误您时间,实在对不起
发布于 2020-09-04 13:36:45
您必须将bindIp设置为0.0.0.0,这样才能通过VM IP连接到mongo
https://stackoverflow.com/questions/63735313
复制相似问题