Docs Menu

db.getMongo()icons/link.png

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.

Give Feedback
MongoDB logo
© 2021 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2021 MongoDB, Inc.