Atlas provide students with the following connection string:
mongo “mongodb+srv://sandbox.mv4hux2.mongodb.net/myFirstDatabase” --username
When I used the above format, I got an error as shown below.
C:\Windows\system32>mongo “mongodb+srv://sandbox.xxxxxxx.mongodb.net/admin” --username
‘mongo’ is not recognized as an internal or external command,
operable program or batch file.
The lecture propose the use of the follwoig command
this gives the same error.
Obviously, mongo is no longer available command in new version of MongoDB. When I used “Mongosh” command instead of “Mongo” I get connected to Atlas but do have any databases as show below
Current Mongosh Log ID: 63462b20c3561dfb4f7df3fc
Connecting to: mongodb+srv://@sandbox.xxxxxxx.mongodb.net/admin?appName=mongosh+1.6.0
Using MongoDB: 5.0.13
Using Mongosh: 1.6.0
For mongosh info see: https://docs.mongodb.com/mongodb-shell/
Warning: Found ~/.mongorc.js, but not ~/.mongoshrc.js. ~/.mongorc.js will not be loaded.
You may want to copy or rename ~/.mongorc.js to ~/.mongoshrc.js.
Atlas atlas-dpf7on-shard-0 [primary] admin>
“show dbs” does not display any results.
It seems that I can connect to my cluster, but cannot interact with it. Can anybody shed some light on this problem?