Make the MongoDB docs better! We value your opinion. Share your feedback for a chance to win $100.
Click here >
Docs Menu
Docs Home
/ /
Database Methods

db.getMongo()

db.getMongo()
Returns:The current database connection.

db.getMongo() runs when the shell initiates. Use this command to test that the mongo shell has a connection to the proper database instance.

Back

db.getLogComponents()