Question

No permissions to update database in Digitalocean managed DB

I deployed a dump of my mongodb to a mongod which is controlled by Digital Ocean, and after connecting to the database, I do not have permission to update some databases, I get Error: not authorized on <ab> to execute command, I have the following rights:

{
"role": "backup",
"db": "admin"
},
{
"role": "clusterMonitor",
"db": "admin"
},
{
"role": "dbAdminAnyDatabase",
"db": "admin"
},
{
"role": "readWriteAnyDatabase",
"db": "admin"
},
{
"role": "restore",
"db": "admin"
}

but if I try to extend them with mongodb, nothing happens, they remain the same, what am I doing wrong?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @dest,

Can you confirm if you are using “doadmin” user to update the user database and getting “Error: not authorized” error?

If not I will suggest using “doadmin” user to update user databases.

For More information on MongoDB managed database users and databases :

https://docs.digitalocean.com/products/databases/mongodb/how-to/manage-users-and-databases/

And for Importing database to MongoDB managed database, you can check the below article :

https://docs.digitalocean.com/products/databases/mongodb/how-to/import-collections/

If you are still seeing not authorize error using “doadmin” user, you can open a support ticket with DigitalOcean.

https://docs.digitalocean.com/support/

Regards, Rajkishore

it seems my database has the name config, and it is the same as the system name, as I understand it …