连接本机MongoDB报错MongoNetworkError/MongooseServerSelectionError

1.连接本机MongoDB报错MongoNetworkError/MongooseServerSelectionError

mongoose连接本机MongoDB用127.0.0.1可以,用localhost不可以

解决方法:
修改MongoDB配置文件

net:
  ipv6: true
  port: 27017
  bindIp: 127.0.0.1,localhost

相关推荐

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-01-21 20:40:01       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-01-21 20:40:01       100 阅读
  3. 在Django里面运行非项目文件

    2024-01-21 20:40:01       82 阅读
  4. Python语言-面向对象

    2024-01-21 20:40:01       91 阅读

热门阅读

  1. 【Delphi 基础知识 22】TStringList 的详细用法

    2024-01-21 20:40:01       49 阅读
  2. CSS Day10

    CSS Day10

    2024-01-21 20:40:01      46 阅读
  3. Linux设置nginx开机自启动

    2024-01-21 20:40:01       52 阅读
  4. C# 字符串(String)

    2024-01-21 20:40:01       55 阅读
  5. datasets的一些使用技巧

    2024-01-21 20:40:01       51 阅读
  6. 【智驾未来】低代码开发:加速创新交融的利器

    2024-01-21 20:40:01       54 阅读
  7. C# 程序结构

    2024-01-21 20:40:01       47 阅读
  8. 【工业智能】VSB Power Line Fault Detection-chapter2

    2024-01-21 20:40:01       52 阅读
  9. 生产告警JVM内存使用率超过80%告警问题排查

    2024-01-21 20:40:01       51 阅读