Cannot Create Collection

I cannot create a collection. I get the following:"not authorized on admin to execute command{create:“movies”, readConcern:{… and it will not allow me to create collection.
Capture

Hi Sara_43123,

Make sure you are on right database on which you want to create this collection. From the error, it looks like you are creating collection on admin database.

The error means the user you are using does not have permission to create a collection. You have give the user ReadWriteAnyDatabase role if you using Atlas(cloud.mongodb.com).

or if you are usnig shell, make this user root.

Kanika

2 Likes

Thank you Dear kanikasingla. it was my problem too. your guidance helped me!

2 Likes