I installed MongoDB 3.2 and I enabled authentication:
security:
authorization: enabled
I created an admin user with the following command in the terminal:
mongo admin --eval 'db.createUser({user:"admin",pwd:"password",roles:["root"]})'
Then I created new database and a user for this database using the following command:
mongo -u admin -p password admin --eval 'db.getSiblingDB("shop").createUser({user:"shop_user",pwd:"password",roles:["dbOwner"]})'
Everything seem to be working. When I'm logged in with the shop_user user I can do everything in the shop database and I can only see this database. But when I'm logged in with the admin user I cannot see the shop database. Since the admin user has the root role, I assume I should be able to see all the databases in my system, but the shop database is hidden from me.
Does anybody know what is happening and how I can make the admin user see all databases?