我是一个初学者,在Heroku上使用Django和MongoDB [插件:MongoLab]。
heroku run python manage.py syncdb
运行 python manage.py syncdb
命令,连接终端... 运行中,编号为 2332
正在创建表格...
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"] })
但是获得:
Error: couldn't add user: not authorized on admin to execute command
先行致谢。