0

I am trying to get all db's from a mongodb instance, but I am only getting db's that have a collection in them. db's that are empty (do not have any collections) are not included in the list.

I have tried using show dbs, show databases, listDatabases with no filter, (https://docs.mongodb.com/manual/reference/command/listDatabases/). nothing worked.

What is the correct command I should use? Also, if anyone knows the corresponding command in pymongo that would be great..

Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.