systemLog:
    destination: file
    path: c:\data\log\mongod.log
storage:
    dbPath: c:\data\db
security:
    authorization: enabled
net:
  port: 28017
  bindIp: 0.0.0.0

    destination:是日志路径

    dbPath: 数据库文件路径

security: 是否启用账号密码验证

    authorization: enabled

net:

  port: 28017 端口

  bindIp: 0.0.0.0 让外面的所以端口都能访问,远程访问必开

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐