0% found this document useful (0 votes)
30 views

Mongodb Installation On Windows: Download The Latest Production Release of Mongodb From

To install MongoDB on Windows: 1. Download and install MongoDB from the official website. 2. Create a data directory to store data and specify it during MongoDB startup. 3. Open the command prompt and run mongod.exe and mongo.exe to start the MongoDB daemon and shell.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Mongodb Installation On Windows: Download The Latest Production Release of Mongodb From

To install MongoDB on Windows: 1. Download and install MongoDB from the official website. 2. Create a data directory to store data and specify it during MongoDB startup. 3. Open the command prompt and run mongod.exe and mongo.exe to start the MongoDB daemon and shell.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

MongoDB Installation on Windows

1. Download the latest production release of MongoDB from www.mongodb.com


2. Install the downloaded file
3. Setup the mongodb environment
MongoDB requires data directory to store all data. Create this folder by running the following
command in a Command Prompt:
md \data\db
4. In command prompt, Specify the following path where the MongoDB is installed
cd C:\Program Files\MongoDB\Server\3.4\bin //Press Enter
mongod.exe –dbpath D:\data\db
5. Open another terminal in command prompt
cd C:\Program Files\MongoDB\Server\3.4\bin //Press Enter
mongo.exe

RoboMongo setup
RoboMongo is modern,robust and community driven GUI for MongoDB.

1. Download RoboMongo from https://robomongo.org/ and install it.


2. In order to establish connection to RoboMongo :
Open command prompt,
cd C:\Program Files\MongoDB\Server\3.4\bin //Press Enter
mongod.exe –dbpath D:\data\db

Open another terminal in command prompt


cd C:\Program Files\MongoDB\Server\3.4\bin //Press Enter
mongo.exe
3. Open RoboMongo tool , it will ask to create a new connection by specifying some name
to the connection and then press connect .

Importing and Exporting Database and Collections


For importing and exporting any database or collections,firstly open command
prompt. Specify the MongoDb the path where MongoDB is installed

cd C:\Program Files\MongoDB\Server\3.4\bin //Press Enter


1. Importing/Exporting Database
 Export entire database
mongodump –d db_name –o outputdirectory

 Import entire database


mongorestore -d db_name path_to_db

2. Importing/Exporting Collections
 Exporting collection
mongoexport –d db_name –c collection_name –o out.json

 Importing collection
mongoimport –d db_name –c collection_name out.json

You might also like