Command to show the db that I'm currently using in MongoDB?
MongodbMongodb Problem Overview
What is the command to show the current db in the MongoDB shell?
(I failed to find it on Google)
Mongodb Solutions
Solution 1 - Mongodb
Found it by guessing :) Simply:
db
Solution 2 - Mongodb
The command to get database name in the shell is:
> db.getName()
While just typing db
Solution 3 - Mongodb
db.current
is a CLI command that will show you the database you are currently working in