Sejin Jeon
Sejin Jeon

Reputation: 335

mongodb - command 'show collection' doesn't show anything

I switched my db properly and also confirmed that there is a document in my collection but I cannot find any collection by 'show collection' command.

enter image description here

Can I know the reason?

Upvotes: 0

Views: 1798

Answers (1)

notionquest
notionquest

Reputation: 39196

Please check your Mongo shell version and MongoDB version are compatible.

Refer to this JIRA ticket which has the similar issue reported. The root cause of the problem was the Mongo shell version and MongoDB version were not compatible.

To get Mongo Shell version:-

Go to the bin folder and execute mongo command which will print the Mongo shell version in the first line.

MongoDB shell version

To get MongoDB version:-

db.version()

Upvotes: 1

Related Questions