简体   繁体   中英

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.

在此处输入图片说明

Can I know the reason?

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版本

To get MongoDB version:-

db.version()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM