账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    MongoDB 连接报错,折磨我一天了
    53
    0

    D:mongodbbin>mongo.exe
    MongoDB shell version v3.6.0
    connecting to: mongodb://127.0.0.1:27017
    MongoDB server version: 3.6.0
    Server has startup warnings:
    2017-12-16T23:50:58.764+0800 I CONTROL [initandlisten]
    2017-12-16T23:50:58.764+0800 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
    2017-12-16T23:50:58.765+0800 I CONTROL [initandlisten] ** Read and write access to data and configuration is
    unrestricted.
    2017-12-16T23:50:58.766+0800 I CONTROL [initandlisten]
    2017-12-16T23:50:58.767+0800 I CONTROL [initandlisten] ** WARNING: This server is bound to localhost.
    2017-12-16T23:50:58.768+0800 I CONTROL [initandlisten] ** Remote systems will be unable to connect to this s
    erver.
    2017-12-16T23:50:58.769+0800 I CONTROL [initandlisten] ** Start the server with --bind_ip <address> to speci
    fy which IP
    2017-12-16T23:50:58.770+0800 I CONTROL [initandlisten] ** addresses it should serve responses from, or with
    --bind_ip_all to
    2017-12-16T23:50:58.771+0800 I CONTROL [initandlisten] ** bind to all interfaces. If this behavior is desire
    d, start the
    2017-12-16T23:50:58.773+0800 I CONTROL [initandlisten] ** server with --bind_ip 127.0.0.1 to disable this wa
    rning.
    2017-12-16T23:50:58.774+0800 I CONTROL [initandlisten]
    2017-12-16T23:50:58.775+0800 I CONTROL [initandlisten]
    2017-12-16T23:50:58.775+0800 I CONTROL [initandlisten] ** WARNING: The file system cache of this machine is configure
    d to be greater than 40% of the total memory. This can lead to increased memory pressure and poor performance.
    2017-12-16T23:50:58.777+0800 I CONTROL [initandlisten] See http://dochub.mongodb.org/cor...
    e
    2017-12-16T23:50:58.778+0800 I CONTROL [initandlisten]

    安了一天没安上,还是报错,求大神,
    win7环境

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • ジ世中沉沦〆 普通会员 1楼

      MongoDB 连接报错是一个常见的问题,它可能会涉及到多种原因。以下是一些可能的原因和解决方案:

      1. MongoDB 连接超时:如果连接超时,MongoDB 将会关闭连接。解决方案是在服务器上设置一个超时时间,然后在连接超时时重新尝试连接。

      2. 数据库未在指定的主机名或端口上运行:确保你正在使用的主机名或端口与 MongoDB 数据库实例在运行时对应。如果你正在使用的是 Web 服务,确保你已经在本地主机上启动了 MongoDB 服务。

      3. MongoDB 客户端设置错误:确保你的 MongoDB 客户端应用程序设置正确。例如,确保你使用的是 MongoDB 的最新版本。

      4. 服务器错误:如果服务器出现错误,可能会导致连接失败。尝试查看 MongoDB 的错误日志,看看是否有关于连接失败的信息。

      5. 数据库已关闭:如果你试图连接到已关闭的数据库,MongoDB 将不会连接。确保你正在连接到一个活跃的数据库实例。

      6. MongoDB 客户端未启动:确保你的 MongoDB 客户端应用程序已经启动。你可以通过运行 mongod 命令来启动 MongoDB。

      7. 服务器端设置错误:如果你正在使用的是 Web 服务,确保你已经在本地主机上启动了 MongoDB 服务。如果可能,你可以尝试在 Web 服务上启动 MongoDB 服务。

      如果你能够确定问题的原因,就可以针对性地进行修复。如果仍然无法解决问题,可能需要寻求专业的 MongoDB 支持。

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部