I am getting the following error:
db assertion failure, assertion: 'unauthorized db:db1 lock type:-1 client:', assertionCode: 10057
I am able to ac开发者_开发技巧cess the MongoDB database by running python on the shell of my server. But when I try to access my site i get this unauthorised errors.
Any fix for this error?
This means that your database is using authentication. In such a setup, you must authenticate a valid user before you can perform any operations (queries, commands, updates, etc). You can do so with the db.auth(username, password)
helper in the mongo shell (described in the MongoDB docs), and with Python, you can use the authenticate(username, password)
method of the Database
object (described in the PyMongo docs)
精彩评论