hugebrazerzkidai.blogg.se

Net start mongodb windows
Net start mongodb windows






net start mongodb windows

I mentioned before that Mongo has got a test db by default called test, try inserting a record into it.In the command prompt, execute the command mongo or mongo.exe again and see what happens.I am sure you people may be remembering the old C programming which we have done on our college day’s right? Ohhh Nooo… don’t close the above Command prompt, leave it as it is… Ok let’s go and see how we are going to use it… Don’t get afraid yes it’s our old command prompt only.

net start mongodb windows

Yes exactly the same command prompt… our good old command prompt… Heiiiii. Lets go query that.īut how without any management studios? Unlike SQL, we have to depend on the command prompt. Now we have to see our DB right? Yea very much, Otherwise how will we know it’s running?įor testing purpose MONGO has got a DB called test by default. But, we have to supply a command to make sure mongo is up and running, i.e. I didn't see any error or warning messages. Next, we can go and start the db using the command `start mongo.exe`! Because I didn’t see any ERROR *** in the console J. Navigate back to `bin`, and enter the command, `mongod.exe -dbpath d:\data`. The next step is to set the Db path to mongo.exe.Why? Because it’s an opportunity for us to remember the old dos commands. I will create then in the `D` drive root, with the help of cmd. Ok, I will create those folders in some other location besides `C` for better understanding of this option.*In other words, if you don't want the mongo databases to be on `C:\`, you have to set the db path for mongo.exe.* However, if it's not in `C`, you have to tell mongo where it is. Mongo looks in `C` by default for this folder, but you can create them wherever you want. Let’s go and create the folder structure in C drive.Ī question arises here: "Is it mandatory to create the data\db directories inside C?" Nooo, not really. We have to create the `data\db` folders in the `C` drive of our BOX in which we are installing mongo. *The next question is where to create these folders?* *So we have to create these `data\db` folders.* And, inside the data folder, a folder called `db`.* The second one is the exception asking us to create a folder called data. *Again a wonderfully formatted exception J we got right? Did you notice what I have highlighted on top? Yeah it is the mongod command. Execute this from the `bin` folder of mongo. We have to start the mongo db by using the command `mongod`. *I got it! Like all other DBs - we have to start the DB engine before we use it.* *Right, then how come it connected to a server in between? Silly Machine …Jz.* *Why did the exception happen? I have no idea. *That was an awesome exception J LOL … What is that?* Type `mongo.exe` (which is the command used to start mongo Db Power shell).Open up a command prompt, then navigate to `bin` in the mongo folder !.In the snap shot below, you can see that I have navigated to the bin folder inside the Mongo folder. Alright then where are you planning to paste the mongo files? In C: or in your Desktop itself?.I am going to copy the extracted files to my D drive, since I don’t have many files there.Copy the files into a desired location in your machine.

net start mongodb windows

It was a zipped file called mongodb-win32-i386-2.4.4.zip (The name of the folder will change according to the version you download, here I got version 2.4.4).

Net start mongodb windows 32 bit#

  • I am using a windows 7 32 bit machine - that’s why I downloaded the package marked in red.Ĭlick download (It only takes a few seconds).
  • That's it! So simple, right? Ok let’s start 1. Extract it and copy the files into your desired location. Technically, it’s not an installation it’s just Downloading… (10) Mongo Installation Process in WindowsĪre you ready for the installation … and use …








    Net start mongodb windows