## Step 2: Start MongoDB. 

To start MongoDB, run mongod.exe . For example, from the Command Prompt : 

C:\mongodb\bin\mongod.exe 

This starts the main MongoDB database process. The waiting for connections message in the console output indicates that the mongod.exe process is running successfully. 

Depending on the security level of your system, Windows may pop up a Security Alert dialog box about blocking “some features” of C:\mongodb\bin\mongod.exe from communicating on networks. All users should select Private Networks, such as my home or work network and click Allow access . For additional information on security and MongoDB, please see the Security Documentation (page 320). 

## Step 3: Connect to MongoDB. 

To connect to MongoDB through the mongo.exe shell, open another Command Prompt . 

C:\mongodb\bin\mongo.exe 

If you want to develop applications using .NET, see the documentation of C# and MongoDB 11 for more information. 

## Step 4: Begin using MongoDB. 

To help you start using MongoDB, MongoDB provides Getting Started Guides in various driver editions. See getting- started for the available editions. 

Before deploying MongoDB in a production environment, consider the Production Notes (page 197) document. 

Later, to stop MongoDB, press Control+C in the terminal where the mongod instance is running. 

## Configure a Windows Service for MongoDB 

## Step 1: Open an Administrator command prompt. 

Press the Win key, type cmd.exe , and press Ctrl + Shift + Enter to run the Command Prompt as Adminis- trator. 

Execute the remaining steps from the Administrator command prompt. 

## Step 2: Configure directories and files. 

Create a configuration file and a directory path for MongoDB log output ( logpath ): 

Create a specific directory for MongoDB log files: 

md "C:\mongodb\log" 

In the Command Prompt , create a configuration file for the logpath option for MongoDB: 

echo logpath=C:\mongodb\log\mongo.log > "C:\mongodb\mongod.cfg" 

