所以我使用mongo开发一个项目,执行代码后出错:
db.usercollection.insert({ "username" : "testuser1", "email" : "testuser1@testdomain.com" })
显示的错误是:
Cannot use 'commands' readMode, degrading to 'legacy' mode WriteResult({ "writeError" : { "code" : 13, "errmsg" : "not authorized on watersheds to execute command { insert: \"usercollection\", documents: [ { _id: ObjectId('568d0eda45d472b121116bef'), username: \"testuser1\", email: \"testuser1@testdomain.com\" } ], ordered: true }" } })
db.version()是3.0.7,我安装的MongoDB shell版本是3.2.0
我该怎么解决这个问题?
此致,达里尔