Re: \data\db not found when starting on Windows with no manual path?

214 views
Skip to first unread message

Adam C

unread,
Apr 25, 2013, 3:10:46 PM4/25/13
to mongod...@googlegroups.com
The path it lists on Windows is relative to the volume, not the current folder.  So, having it in the mongodb folder is not going to work for the defaults, what you need to create is:

C:\data\db\

Adam

On Thursday, April 25, 2013 7:19:39 PM UTC+1, Joe Millenbach wrote:
I just installed MongoDB for the first time and have been following the directions at http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/ .  They seem pretty good, but for some reason when I tried to start the server I get this error even though I have created the required folders down to C:\mongodb\data\db ...

C:\mongodb>C:\mongodb\bin\mongod.exe
C:\mongodb\bin\mongod.exe --help for help and startup options
Thu Apr 25 11:09:55.533 [initandlisten] MongoDB starting : pid=9428 port=27017 d
bpath=\data\db\ 64-bit host=<hostname>
Thu Apr 25 11:09:55.535 [initandlisten] db version v2.4.3
Thu Apr 25 11:09:55.537 [initandlisten] git version: fe1743177a5ea03e91e0052fb5e
2cb2945f6d95f
Thu Apr 25 11:09:55.538 [initandlisten] build info: windows sys.getwindowsversio
n(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1') BOOST
_LIB_VERSION=1_49
Thu Apr 25 11:09:55.541 [initandlisten] allocator: system
Thu Apr 25 11:09:55.542 [initandlisten] options: {}
Thu Apr 25 11:09:55.543 [initandlisten] exception in initAndListen: 10296
*********************************************************************
 ERROR: dbpath (\data\db\) does not exist.
 Create this directory or give existing directory in --dbpath.
*********************************************************************
, terminating

This happens when running from a different folder, and from C:\mongodb.  It works fine if I specify the path manually with "mongod.exe --dbpath C:\mongodb\data\db\" but I assume I shouldn't have to.  I'm actually surprised I have to manually make folders, but this is probably to make sure people put files where they mean versus not realizing they could move them.
Reply all
Reply to author
Forward
0 new messages