“Use” command is use to create new database if database not exist or
switch to database if exist
USE <database_name>
> use cdac ; switched to db cdac
But If you will check it will not show you newly created cdac database till you will not create any collection in new created cdac database
> show dbs; admin 0.000GB exampled 0.000GB local 0.000GB sachin 0.000GB
Create Collection and check database is listed
> db.createCollection('student'); { "ok" : 1 } > show dbs; admin 0.000GB cdac 0.000GB exampled 0.000GB local 0.000GB sachin 0.000GB
NEXT :CREATE COLLECTION