Why in MongoDB Compass the admin table always empty?

When I use MongoDB Compass, I always have and wonder, why there is no content in the admin table, I did create an admin account, and switched the role from userAdminAnyDatabase to root, and also set the mongod.cfg file :

   authorization: enabled

In MongoDB Compass, admin table showed some information, admin.temproles and admin.tempusers, but I don’t know what is this. when I uses the PHP-driven MongoDB-PHP-GUI, which has always displayed the complete content of the admin table : ↓

I think it’s important to show the contents of the admin table, if you don’t know what’s in there, everything gets blurred, this problem is so strange. Can someone explain why and how to make the admin table display all the complete content ?

  1. I think the answer to “why” is “MongoDB Team does not want to give you a footgun.”
  2. The answer to “how” is that you can access these somewhat-hidden collections within the mongosh shell in Compass (or any mongosh shell instance). It may require you to create a custom user role and assign it to your user as described in the article MongoDB admin user cannot access system.views collection

See the following also:

Oh, I understand that this is based on security considerations, but in fact it also brings inconvenience. According to normal logical thinking, accounts with root or userAdminAnyDatabase should be able to see the admin database Content.

The user experience of MongoDB Compass is very poor, and it is not even comparable to MongoDB-PHP-GUI in this respect, because the degree of freedom is very important, even if it poses a threat to security, it is the user’s own business, MongoDB Compass manages too much Already…

So MongoDB Compass can’t display the contents of the admin database no matter what, or what settings can be used to achieve it ?


In my earlier comments, I’m just guessing, I’m not a MongoDB employee, so I can’t be sure of their motivations.

I use mongosh in Compass a lot, and I use the facilities provided in the privileges API to adjust things to my liking. I imagine MongoDB-PHP-GUI is doing something like that behind the scenes.

So I’m happy with Compass. I may try MongoDB-PHP-GUI as well, though there don’t seem to be any updates to that project since last July.