View all the Existing Databases
To view all existing databases in MongoDB use the “show dbs” command.
Syntax
show dbs
This command returns a list of all the existing MongoDB databases.
To check your current database use the “db” command
How to Create Database and Collection in MongoDB
MongoDB stores data records as documents that are stored together in collections and the database stores one or more collections of documents.
In this article, we will look at methods to create a database and collection in MongoDB.