Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set mongodb configuration path using mongodb.config in Windows

I am trying to set up mongodb 2.6.3 on Windows,I have installed it and would like to configure the dbpath using a mongodb.config file at C:\Program Files\MongoDB 2.6 Standard\bin

I have tried adding it like this:

 dbpath=E:\Do\mongodb

I have also tried to add it like this(tested it in YAML Parser online):

- storage:
   -   dbPath:"E:\Do\mongodb"

It seems like neither of these works,how can I set up config options for my mongodb.It does not even seem to be recognizing the configuration file,I even tried it mongod --config but it did not work.

like image 304
vamsiampolu Avatar asked Sep 23 '14 09:09

vamsiampolu


1 Answers

It works for me, using :

dbpath=T:\data\db

My mongodb version is also 2.6.3

By the way, my config file is named "mongod.cfg", but yours is "mongodb.config". Maybe this counts.

Anyway, try to follow the tutorial:http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/ It works

like image 158
Lelouchzqy Avatar answered Oct 13 '22 11:10

Lelouchzqy