Purpose : how to create database and verify that it is created using shell.

Step 1:

Create file with name : db_create.js

mongo=new Mongo(“localhost”);
newDB=mongo.getDB(“newDB”);
newDB.createCollection(“newCollection”);

ice_screenshot_20151210-140530

 

Advertisements