Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OperationFailure: database error: not authorized for query on database.system.namespaces

I am beginner lift with django mongodb on heroku [ addon : mongolab ].

heroku run python manage.py syncdb

Running python manage.py syncdb attached to terminal... up, run.2332 Creating tables ...

OperationFailure: database error: not authorized for query on database.system.namespaces consider editing privileges on the basis of data mongo

.

>use admin
>db.addUser({ user: "myadmin", pwd: "1234", roles: ["userAdminAnyDatabase"] })

but get:

Error: couldn't add user: not authorized on admin to execute command 

Thanks in advance.

like image 749
Anderson Dorregaray Linares Avatar asked Jun 04 '15 04:06

Anderson Dorregaray Linares


1 Answers

Heroku Postgres does not allow for user creation. You'll want to use the connection string provided in DATABASE_URL. Actions like creating/dropping DB's and creating users is prohibited.

like image 189
jmccartie Avatar answered Oct 15 '22 04:10

jmccartie