Why my Mac "/usr/local/opt/mongodb-community/bin/" do not have "mongo" (install via HomeBrew)

So when I use command
mongo “mongodb+srv://m001-student:m001-mongodb-basics@sandbox.mongodb.net/admin”
It shows zsh: command not found: mongo
But I can use command mongod, mongos, mongosh

mongo is no longer available in MongoDB 6.0. The new default shell is mongosh. You should be able to do what you need to do with

mongosh "mongodb+srv://m001-student:m001-mongodb-basics@sandbox.mongodb.net/admin"
2 Likes

Thank you.
I try using

mongosh "mongodb+srv://m001-student:m001-mongodb-basics@sandbox.mongodb.net/admin"

It has error as:

Current Mongosh Log ID: 630dd32e48748bf9f82eef4f
Connecting to: **mongodb+srv://<credentials>@sandbox.mongodb.net/admin?appName=mongosh+1.5.4**
Error: querySrv ENOTFOUND _mongodb._tcp.sandbox.mongodb.net

But when I add "iejbu2y" to the link as…

mongosh "mongodb+srv://m001-student:m001-mongodb-basics@sandbox.iejbu2y.mongodb.net/admin"

→ It’s work
So. I think use mongosh instead of mongo but the code must be added to the link

Hi :wave: @dbothsamitti,

Please refer to the documentation to learn more about the Connection String URI Format.

Thanks,
Kushagra

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.