2

My MongoDB shell has version v3.6.5 (the same with older versions) & MongoDB server has version: 3.6.8

I have MongoDB M0 Free Tier cluster and I want to use from shell different commands.

So, I created admin user with password: enter image description here

Set up IP Whitelist: enter image description here

And then connect via MongoDB shell using admin user: enter image description here

Up to this point, everything is fine, but when I started to use commands I get always the issue: enter image description here

I checked the answer from here and tried to create admin user directly from mongodb shell using command, but also the same error: enter image description here

Why it happens? If I has already created admin user? Can someone explain me, thanks a lot in advance.

2

Since you are using a hosted database service (MongoDB Atlas), many administrative commands are limited as they are either provided via the management interface or likely to introduce performance/stability issues.

The Atlas free tier has additional limitations since it is backed by a shared MongoDB instance. See: Unsupported Commands in M0/M2/M5 Clusters.

"not authorized on admin to execute command {setFeatureCompatibilityVersion: \"3.4\" }"

The setFeatureCompatibilityVersion command is an administrative command used during upgrades. You cannot set this on Atlas Free Tier (M0) or shared (M2/M5) clusters.

db.createUser(...)

User permissions and roles for MongoDB Atlas must be managed via the Atlas user interface or API. See: Add MongoDB Users.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.