I scanned the discussion board and didn’t see posts about this issue. I used this db in previous weeks, and I can still connect to video
and query movieDetails
, but in both shell and Compass I am getting no results for the 100YWeatherSmall
db. Please advise so I can do week 3.
Here are my commands and results:
First connect directly to 100YWeatherSmall
database:
me@DESKTOP-VAQRJL8 MINGW64 ~ (master)
$ mongo "mongodb://sandbox-shard-00-00-xhoxh.mongodb.net:27017,sandbox-shard-00-01-xhoxh.mongodb.ne
t:27017,sandbox-shard-00-02-xhoxh.mongodb.net:27017/100YWeatherSmall?replicaSet=Sandbox-shard-0" --
ssl --authenticationDatabase admin --username m001-student --password m001-mongodb-basics
MongoDB shell version v4.0.5
connecting to: mongodb://sandbox-shard-00-00-xhoxh.mongodb.net:27017,sandbox-shard-00-01-xhoxh.mongodb.net:27017,sandbox-shard-00-02-xhoxh.mongodb.net:27017/100YWeatherSmall?authSource=admin&gssapiServiceName=mongodb&replicaSet=Sandbox-shard-0
2019-01-22T16:27:43.902-0800 I NETWORK [js] Starting new replica set monitor for Sandbox-shard-0/sandbox-shard-00-00-xhoxh.mongodb.net:27017,sandbox-shard-00-01-xhoxh.mongodb.net:27017,sandbox-shard-00-02-xhoxh.mongodb.net:27017
2019-01-22T16:27:44.350-0800 I NETWORK [ReplicaSetMonitor-TaskExecutor] Successfully connected to sandbox-shard-00-02-xhoxh.mongodb.net:27017 (1 connections now open to sandbox-shard-00-02-xhoxh.mongodb.net:27017 with a 5 second timeout)
2019-01-22T16:27:44.350-0800 I NETWORK [js] Successfully connected to sandbox-shard-00-01-xhoxh.mongodb.net:27017 (1 connections now open to sandbox-shard-00-01-xhoxh.mongodb.net:27017 with a 5 second timeout)
2019-01-22T16:27:44.843-0800 I NETWORK [ReplicaSetMonitor-TaskExecutor] Successfully connected to sandbox-shard-00-00-xhoxh.mongodb.net:27017 (1 connections now open to sandbox-shard-00-00-xhoxh.mongodb.net:27017 with a 5 second timeout)
Implicit session: session { "id" : UUID("e83836c5-eca0-4e2d-a303-279bf31dda75") }
MongoDB server version: 4.0.5
Error while trying to show server startup warnings: user is not allowed to do action [getLog] on [admin.]
MongoDB Enterprise Sandbox-shard-0:PRIMARY> show collections
MongoDB Enterprise Sandbox-shard-0:PRIMARY> use 100YWeatherSmall
switched to db 100YWeatherSmall
MongoDB Enterprise Sandbox-shard-0:PRIMARY> show collections
MongoDB Enterprise Sandbox-shard-0:PRIMARY>
MongoDB Enterprise Sandbox-shard-0:PRIMARY> quit()
Apparently there are no collections to show. quit()
try again, connecting to test
database, then switch to video
and show movieDetails
collection to prove my connection works, then switch to 100YWeatherSmall
and again see no collections:
me@DESKTOP-VAQRJL8 MINGW64 ~ (master)
$ mongo "mongodb://sandbox-shard-00-00-xhoxh.mongodb.net:27017,sandbox-shard-00-01-xhoxh.mongodb.ne
t:27017,sandbox-shard-00-02-xhoxh.mongodb.net:27017/test?replicaSet=Sandbox-shard-0" --ssl --authen
ticationDatabase admin --username m001-student --password m001-mongodb-basics
MongoDB shell version v4.0.5
connecting to: mongodb://sandbox-shard-00-00-xhoxh.mongodb.net:27017,sandbox-shard-00-01-xhoxh.mongodb.net:27017,sandbox-shard-00-02-xhoxh.mongodb.net:27017/test?authSource=admin&gssapiServiceName=mongodb&replicaSet=Sandbox-shard-0
2019-01-22T16:36:15.600-0800 I NETWORK [js] Starting new replica set monitor for Sandbox-shard-0/sandbox-shard-00-00-xhoxh.mongodb.net:27017,sandbox-shard-00-01-xhoxh.mongodb.net:27017,sandbox-shard-00-02-xhoxh.mongodb.net:27017
2019-01-22T16:36:15.995-0800 I NETWORK [ReplicaSetMonitor-TaskExecutor] Successfully connected to sandbox-shard-00-00-xhoxh.mongodb.net:27017 (1 connections now open to sandbox-shard-00-00-xhoxh.mongodb.net:27017 with a 5 second timeout)
2019-01-22T16:36:15.997-0800 I NETWORK [js] Successfully connected to sandbox-shard-00-02-xhoxh.mongodb.net:27017 (1 connections now open to sandbox-shard-00-02-xhoxh.mongodb.net:27017 with a 5 second timeout)
2019-01-22T16:36:16.441-0800 I NETWORK [ReplicaSetMonitor-TaskExecutor] Successfully connected to sandbox-shard-00-01-xhoxh.mongodb.net:27017 (1 connections now open to sandbox-shard-00-01-xhoxh.mongodb.net:27017 with a 5 second timeout)
Implicit session: session { "id" : UUID("a2ff703b-27e9-4a1c-9370-1a57b496a018") }
MongoDB server version: 4.0.5
Error while trying to show server startup warnings: user is not allowed to do action [getLog] on [admin.]
MongoDB Enterprise Sandbox-shard-0:PRIMARY> show collections
MongoDB Enterprise Sandbox-shard-0:PRIMARY> use video
switched to db video
MongoDB Enterprise Sandbox-shard-0:PRIMARY> show collections
movieDetails
MongoDB Enterprise Sandbox-shard-0:PRIMARY> use 100YWeatherSmall
switched to db 100YWeatherSmall
MongoDB Enterprise Sandbox-shard-0:PRIMARY> show collections
MongoDB Enterprise Sandbox-shard-0:PRIMARY>
In Compass “My Cluster” shows 3 DBS 7 COLLECTIONS: admin
, local
, and video
. Admin
is empty, local
I haven’t used yet, and video
is as expected. There is no weather
db. It’s as if I deleted it, but I’m not sure how that would have happened.
Please advise so I can do week 3.