本文介绍了如何在Windows上启动mongo db的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是 mongo
的新用户,我正试图在我的Windows系统上安装mongo。我按照本教程,但是当我做
C:\mongodb\bin\mongod.exe
我的 CMD
给我这个输出
2015-04-20T18:53:27.433 + 0500 I STORAGE [initandlisten] ini中的异常
pre>
en:29数据目录C: \\ data \db \ not found。,terminate
2015-04-20T18:53:27.436 + 0500 I CONTROL [initandlisten] dbexit:rc:100
解决方案MongoDB需要一个数据目录来存储所有数据。 MongoDB的默认数据目录路径是
\data\db
。
创建此文件夹
md \data\db
您可以使用
- dbpath
选项到mongod.exe,例如:
C:\mongodb\bin\mongod。 exe --dbpath d:\test\mongodb\data
如果您的路径包含空格,用双引号将整个路径括起来
例如:
C:\mongodb\bin\mongod.exe --dbpathd:\test\mongo db data
I am new to
mongo
, and I am trying to install mongo on my windows system. I am following THIS tutorial, but when I doC:\mongodb\bin\mongod.exe
my
CMD
gives me this output2015-04-20T18:53:27.433+0500 I STORAGE [initandlisten] exception in ini en: 29 Data directory C:\data\db\ not found., terminating 2015-04-20T18:53:27.436+0500 I CONTROL [initandlisten] dbexit: rc: 100
解决方案MongoDB requires a data directory to store all data. MongoDB’s default data directory path is
\data\db
.Create this folder
md \data\db
You can specify an alternate path for data files using the
--dbpath
option to mongod.exe, for example:C:\mongodb\bin\mongod.exe --dbpath d:\test\mongodb\data
If your path includes spaces, enclose the entire path in double quotes,
for example:
C:\mongodb\bin\mongod.exe --dbpath "d:\test\mongo db data"
这篇关于如何在Windows上启动mongo db的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!