windows上MongoDB远程访问配置

今天用另一台机器上的MongoDB,但是使用本地连接时,没问题

 换成IP地址时,出现

解决的方法,修改配置文件

systemLog:
    destination: file
    path: d:/Mongodata/log/mongod.log
storage:
    dbPath: d:/Mongodata
security:
     authorization: enabled
net:
  port: 27017
  bindIp: 127.0.0.1,0.0.0.0

重启MongoDB

更多配置查看 https://docs.mongodb.com/manual/reference/configuration-options/

原文地址:https://www.cnblogs.com/baby123/p/12027664.html