Simple command Used to create database in MongoDB
- First Open terminal and open mongoDB shell.
- 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.