- Download MongoDB server from the https://www.mongodb.com/download-center and install. ( i prefer community edition ).
- For these instructions, let us assume that you have installed MongoDB to
- MongoDB requires a data directory to store all data, so lets create a folder and point the data path to that folder.
"C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe" --dbpath d:\test\mongodb\data
- Now Start the MongoDB. Run the following code in command prompt.
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.
- To connect to MongoDB through the mongo.exe shell, open another Command Prompt.
- In the Above mongo shell you can run some commands and play through it like ,
- show dbs – Shows list of database
- use dbName – Switch to that database
- db.stats() – Gives the db status
- show collections – Shows list of collections
- db.collectionName.find() – List all the data in the collection
For More commands refer https://docs.mongodb.com/manual/mongo/
For Accessing this MongoDB with Local Node ( Refer Link )