Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

333
Views
Mongo-Express not showing all DBs with root admin

I am having a bit trouble setting up mongo-express with my local mongodb install. Basically, I created an admin user like this:

  db.createUser(
   {
       user: "admin", 
       pwd: "abc123", 
       roles:["root"]
   })

And in mongo-express's config.js I specified this account for the authentication. Running mongo-express -u "admin" -p "abc123" -d "admin" works, and opening the webview shows the admin database.

enter image description here

But that is the only DB it shows there, but I have more DBs within mongodb:

> show dbs
admin     0.000GB
local     0.000GB
test      0.112GB

I want the test DB to show up there as well, but I do not understand whats preventing mongo-express from displaying it. I do understand that authentication happens at DB level, but since the admin was created with root as role, mongo-express should be able to display all DBs, right?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Ok I found the problem:

Apparently one has to run 'mongo-express' with the '-a' flag when admin credentials are stored in the config.js and one wishes to let mongo-express access mongodb as admin.

This helped me: how to make mongo-express show all db?

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!