MongoDB 8 cheatsheet
MongoDB 8: Connecting and navigating
7 common MongoDB 8 tasks.
Connect to a local server
Open the shell against a database on the default port.
mongosh "mongodb://localhost:27017/mydb"
Connect to Atlas
Connect with a connection string and a user, prompting for the password.
mongosh "mongodb+srv://cluster0.example.mongodb.net/mydb" --username appUser