Connect directly with a full connection string.
Section: Connect and navigate
Connect with a MongoDB URI
bash
bash
mongosh "mongodb://localhost:27017/appdb"Explanation
Useful for choosing the target database immediately.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Connect and navigate