gpt4 book ai didi

windows - mongo 3.6.2 无法在 Windows 7/10 中启动

转载 作者:可可西里 更新时间:2023-11-01 10:39:46 25 4
gpt4 key购买 nike

我正在尝试在我的 Windows 机器上安装 mongodb。

执行“mongo”命令时,出现以下错误:

C:\Users\Mohamed>mongo
MongoDB shell version v3.6.2
connecting to: mongodb://127.0.0.1:27017
2018-01-26T18:51:11.568+0100 W NETWORK [thread1] Failed to connect to 127.0.0.1
:27017 after 5000ms milliseconds, giving up.
2018-01-26T18:51:11.568+0100 E QUERY [thread1] Error: couldn't connect to ser
ver 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:251:13
@(connect):1:6
exception: connect failed

当执行“mongod”命令时,我得到以下输出:

C:\Users\Mohamed>mongod

我删除了一些输出以绕过强加的限制

create,cache_size=2510M,session_max=20000,eviction=(threads_min=4,threads_max=4)
,config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal
,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0
),verbose=(recovery_progress),
2018-01-26T18:54:10.321+0100 I CONTROL [initandlisten]
2018-01-26T18:54:10.322+0100 I CONTROL [initandlisten] ** WARNING: Access contr
ol is not enabled for the database.
2018-01-26T18:54:10.323+0100 I CONTROL [initandlisten] ** Read and wri
te access to data and configuration is unrestricted.
2018-01-26T18:54:10.325+0100 I CONTROL [initandlisten]
2018-01-26T18:54:10.325+0100 I CONTROL [initandlisten] ** WARNING: This server
is bound to localhost.
2018-01-26T18:54:10.326+0100 I CONTROL [initandlisten] ** Remote syste
ms will be unable to connect to this server.
2018-01-26T18:54:10.328+0100 I CONTROL [initandlisten] ** Start the se
rver with --bind_ip <address> to specify which IP
2018-01-26T18:54:10.329+0100 I CONTROL [initandlisten] ** addresses it
should serve responses from, or with --bind_ip_all to
2018-01-26T18:54:10.330+0100 I CONTROL [initandlisten] ** bind to all
interfaces. If this behavior is desired, start the
2018-01-26T18:54:10.330+0100 I CONTROL [initandlisten] ** server with
--bind_ip 127.0.0.1 to disable this warning.
2018-01-26T18:54:10.331+0100 I CONTROL [initandlisten]
2018-01-26T18:54:10.331+0100 I CONTROL [initandlisten] Hotfix KB2731284 or late
r update is not installed, will zero-out data files.
2018-01-26T18:54:10.332+0100 I CONTROL [initandlisten]
2018-01-26T18:54:10.333+0100 I CONTROL [initandlisten] ** WARNING: The file sys
tem cache of this machine is configured to be greater than 40% of the total memo
ry. This can lead to increased memory pressure and poor performance.
2018-01-26T18:54:10.334+0100 I CONTROL [initandlisten] See http://dochub.mongod
b.org/core/wt-windows-system-file-cache
2018-01-26T18:54:10.335+0100 I CONTROL [initandlisten]
2018-01-26T18:54:10.338+0100 I STORAGE [initandlisten] createCollection: admin.
system.version with provided UUID: 70e33b89-7e69-4b86-8309-ff9b06207e41
2018-01-26T18:54:10.520+0100 I COMMAND [initandlisten] setting featureCompatibi
lityVersion to 3.6
2018-01-26T18:54:10.531+0100 I STORAGE [initandlisten] createCollection: local.
startup_log with generated UUID: 6728ada5-b42d-443c-823a-1a8ead4eebc2
2018-01-26T18:54:11.584+0100 W FTDC [initandlisten] Failed to initialize Per
formance Counters for FTDC: WindowsPdhError: PdhExpandCounterPathW failed with '
L'objet spécifié n'a pas été trouvé sur l'ordinateur.' for counter '\Memory\Avai
lable Bytes'
2018-01-26T18:54:11.585+0100 I FTDC [initandlisten] Initializing full-time d
iagnostic data capture with directory 'C:/data/db/diagnostic.data'
2018-01-26T18:54:11.590+0100 I NETWORK [initandlisten] waiting for connections
on port 27017

你能帮我解决这个问题吗?

最佳答案

只运行mongod之后,就可以运行mongo了。否则,它会抛出上述错误。

这是我做的:

  • 使用终端访问 -/usr/local/Cellar/mongodb/3.6.1(在 mac 中)
  • 运行mongod
  • 在新窗口/选项卡中运行 - mongo

在您的情况下,您已完成上述两个步骤。只需在新的终端窗口/选项卡中尝试运行 mongo

希望对您有所帮助。随时纠正我的答案:)

关于windows - mongo 3.6.2 无法在 Windows 7/10 中启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48467964/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com