How to change the default data directory in Windows

3,784 views
Skip to first unread message

HP

unread,
Apr 20, 2011, 10:40:00 PM4/20/11
to mongodb-user
Daer all,

I am a new mongodb user.
Please help to have answers for my 2 questions.
1. The MongoDB will store data in \data\db by default on windows
installation. Is it possible to change it and how.
2. The port 27017 and 28017 will be when start up mongodb, is it
possible to change the portnumber.

Thanks,

Scott Hernandez

unread,
Apr 20, 2011, 10:55:07 PM4/20/11
to mongod...@googlegroups.com
Yes, it is all configurable:
http://www.mongodb.org/display/DOCS/Command+Line+Parameters

> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>

宋维彬

unread,
Apr 20, 2011, 10:58:11 PM4/20/11
to mongod...@googlegroups.com
if data directory in d:\mongo\data\db\

you can use --dbpath=d:\mongo\data\db\ argument start mongodb.

--dbpath=[directory] is change default mongodb directory.
Reply all
Reply to author
Forward
0 new messages