mongod 2016-05-09T19:48:32.489-0400 I CONTROL [initandlisten]-6ren">
gpt4 book ai didi

mongodb - 我正在尝试安装 MongoDB,但出现此错误 "Data directory C:\data\db\not found., terminating"

转载 作者:IT老高 更新时间:2023-10-28 13:27:30 24 4
gpt4 key购买 nike

我正在尝试安装 MongoDB,但我遇到了一些困难

C:\Users\HP>mongod
2016-05-09T19:48:32.489-0400 I CONTROL [initandlisten] MongoDB starting : pid=4
284 port=27017 dbpath=C:\data\db\ 64-bit host=hp_pc
2016-05-09T19:48:32.490-0400 I CONTROL [initandlisten] targetMinOS: Windows 7/W
indows Server 2008 R2
2016-05-09T19:48:32.490-0400 I CONTROL [initandlisten] db version v3.2.6
2016-05-09T19:48:32.490-0400 I CONTROL [initandlisten] git version: 05552b562c7
a0b3143a729aaa0838e558dc49b25
2016-05-09T19:48:32.490-0400 I CONTROL [initandlisten] OpenSSL version: OpenSSL
1.0.1p-fips 9 Jul 2015
2016-05-09T19:48:32.490-0400 I CONTROL [initandlisten] allocator: tcmalloc
2016-05-09T19:48:32.490-0400 I CONTROL [initandlisten] modules: none
2016-05-09T19:48:32.491-0400 I CONTROL [initandlisten] build environment:
2016-05-09T19:48:32.491-0400 I CONTROL [initandlisten] distmod: 2008plus-ss
l
2016-05-09T19:48:32.491-0400 I CONTROL [initandlisten] distarch: x86_64
2016-05-09T19:48:32.491-0400 I CONTROL [initandlisten] target_arch: x86_64
2016-05-09T19:48:32.491-0400 I CONTROL [initandlisten] options: {}
2016-05-09T19:48:32.492-0400 I STORAGE [initandlisten] exception in initAndList
en: 29 Data directory C:\data\db\ not found., terminating
2016-05-09T19:48:32.493-0400 I CONTROL [initandlisten] dbexit: rc: 100
C:\Users\HP>

所以,我决定在 DB 文件夹中创建 db 文件夹,并将其输入到命令行中

`mongod --dbpath C:\Program Files\MongoDB\Server\3.2\data\db`

但是,我得到一个错误

Invalid command: Files\MongoDB\Server\3.2\data\db

我已经创建了文件。我不明白这个问题。

最佳答案

你的命令中有一个空格

`mongod --dbpath C:\Program Files\MongoDB\Server\3.2\data\db`

应该是

mongod --dbpath "C:\Program Files\MongoDB\Server\3.2\data\db"

关于mongodb - 我正在尝试安装 MongoDB,但出现此错误 "Data directory C:\data\db\not found., terminating",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37127329/

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