mongodb 4找不到数据目录C:\ data \ db \ [英] mongodb 4 Data directory C:\data\db\ not found
问题描述
我下载并安装了MongoDb的最新版本4.0.2,并设置了正确的路径变量.
当我想使用 mongod
命令启动mondoDb服务时,出现以下错误:
I download and install the last vesrion of MongoDb which is 4.0.2 and i set the correct path variable.
When i want to start the mondoDb service using mongod
command i got the following error:
initAndListen中的异常:NonExistentPath:找不到数据目录C:\ data \ db \.终止
exception in initAndListen: NonExistentPath: Data directory C:\data\db\ not found., terminating
我知道我应该创建丢失的目录,但是该目录会在以下路径中自动创建: C:\ Program Files \ MongoDB \ Server \ 4.0 我检查了mongod.cfg文件,并且已经设置了正确的路径: dbPath:C:\ Program Files \ MongoDB \ Server \ 4.0 \ data
i know that i should create the directory missing, but that directory is automatically created in the following path: C:\Program Files\MongoDB\Server\4.0
I checked the mongod.cfg file and the correct path is already set : dbPath: C:\Program Files\MongoDB\Server\4.0\data
现在如何告诉mongo在正确的路径中查找他认为丢失的文件夹?
Now how to tell the mongo to look for the folder he thinks is missing in the correct path ?
推荐答案
我遇到了同样的问题,但是在创建目录 C:\ data \ db \
后,它才起作用.
I had the same issue but after I create the directory C:\data\db\
it just worked.
这篇关于mongodb 4找不到数据目录C:\ data \ db \的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!