Mongo: show dbs does not show db test. What for?

When I first type mongo , I see a "connection to: test". However, when I type show dbs , it does not show me test db. I still see local , as well as some other dbs that I created ... but not test . Any clues why?

+7
mongodb
source share
1 answer

If you type db , you will see that you are in a database called test, but it will not appear in the list, which happens because test db does not contain any document that is empty. You need to create at least one document in the test database if you want it to appear in the list after entering show dbs

+13
source share

All Articles