Simple command Used to create database in MongoDB

  1. First Open terminal and open mongoDB shell.
  2. run this command to create database
use mydatabase

Replace "mydatabase" with the name  of actual database.

To confirm that the database has been created, you can run this command-

db

Show the name of current database which you are using.