我将ip添加到白名单,然后在mac终端上键入命令:
mongo "mongodb+srv://cluster0.vcwmp.mongodb.net/movietogo" --username motogod19
然后显示信息:
MongoDB shell version v4.2.2
Enter password:
connecting to: mongodb://cluster0-shard-00-00.vcwmp.mongodb.net:27017,cluster0-shard-00-01.vcwmp.mongodb.net:27017,cluster0-shard-00-02.vcwmp.mongodb.net:27017/movietogo?authSource=admin&compressors=disabled&gssapiServiceName=mongodb&replicaSet=atlas-fdputk-shard-0&ssl=true
2020-08-31T16:48:10.763+0800 I NETWORK [js] Starting new replica set monitor for atlas-fdputk-shard-0/cluster0-shard-00-00.vcwmp.mongodb.net:27017,cluster0-shard-00-01.vcwmp.mongodb.net:27017,cluster0-shard-00-02.vcwmp.mongodb.net:27017
2020-08-31T16:48:10.763+0800 I CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to cluster0-shard-00-01.vcwmp.mongodb.net:27017
2020-08-31T16:48:10.763+0800 I CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to cluster0-shard-00-02.vcwmp.mongodb.net:27017
2020-08-31T16:48:10.763+0800 I CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to cluster0-shard-00-00.vcwmp.mongodb.net:27017
2020-08-31T16:48:11.851+0800 I NETWORK [ReplicaSetMonitor-TaskExecutor] Confirmed replica set for atlas-fdputk-shard-0 is atlas-fdputk-shard-0/cluster0-shard-00-00.vcwmp.mongodb.net:27017,cluster0-shard-00-01.vcwmp.mongodb.net:27017,cluster0-shard-00-02.vcwmp.mongodb.net:27017
Implicit session: session { "id" : UUID("06519e67-e738-44fa-a31d-697c845949f7") }
MongoDB server version: 4.2.8
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
MongoDB Enterprise atlas-fdputk-shard-0:PRIMARY>
但是当我打开浏览器时,我无法选择任何集合或数据库。
只需在终端上键入命令是错误的?