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

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐