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?
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.
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 …