Installing MongoDB on another drive in Windows

2

I'm trying to install MongoDB on a drive other than "C".

However when trying to use the "mongo" command in the terminal the following error is returned:

  

Failed to connect to localhost: 27017

The examples I encounter only talk about "C:". How to configure MongoDB to work on another drive?

I want it to look like this:

  • E: \ programs \ mongodb
  • E: \ programs \ mongodb \ data \ db

Is it possible or does it only allow installation on the Windows installation drive?

    
asked by anonymous 28.09.2014 / 14:28

1 answer

2

I was able to install MongoDB.

I created the "logs" and "data / db" folders inside the "mongodb" folder and then executed the following command:

  e: \ programs \ mongodb \ bin \ mongod.exe --logpath "e: \ programs \ mongodb \ logs \ server.log" --dbpath "e: \ programs \ mongodb \ data \ db" --install

In addition to changing the directory, I installed the "MongoDB" service avoiding having to open the pront.

    
28.09.2014 / 15:34