Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>
Mongodb version 3.2.18 test questions:
Analysis:
Judging from the content of the error report, the authority is not enough, but I don’t know why, because the super user authority already used:
{
"_id" : "admin.myUserAdmin",
"user" : "root",
"db" : "admin",
"roles" : [
{
"role" : "userAdminAnyDatabase",
"db" : "admin"
},
{
"role" : "dbOwner",
"db" : "admin"
}
]
}
After the solution to the query error, it is found that the cluster management authority is insufficient. After adding the corresponding authority, the problem can be solved. The change of user authority is as follows:
db.updateUser(
"root",
{
roles :
[
{"role" : "userAdminAnyDatabase","db" : "admin"},
{"role" : "dbOwner","db" : "admin"},
{"role" : "clusterAdmin", "db": "admin"}
]
}
)
Successfully shut down the database system:
db.shutdownServer({shutdown: 1, force: true})
http://blog.csdn.net/warrior_zhang/article/details/50503407
See also 38142142;
User: https://docs.mongodb.org/v3.0/reference/method/db.updateUser/
mongodb backup location: http://www.linuser.com/thread-507-1-1.html
mongodb user roles:https http://docs.mongodb.org/v3.0/reference/built-in-roles/
reward detection: http://stackoverflow.com/questions/13303685/stop-unknown-instance-mongodb-ubuntu
Similar Posts:
- Error occurred when using java to connect mongodb: command failed with error 18 (authentication failed): “authentication failed.”
- Mongovue is unable to create collections and log in with user name and password
- Mongodb access control is not enabled for the database
- When deploying Tomcat service, resolve the cannot invoke Tomcat manager exception
- [Solved] PHP connect to MongoDB error: Server does not support sessions
- Mongodb Cannot Start: child process failed, exited with error number 100
- Solution of Su command cannot set groups: operation not permitted
- mongodb:E QUERY [thread1] SyntaxError: missing ; before statement @(shell):1:4
- How to Solve MongoDB Error: Authentication failed.
- [Solved] Mongodb startup error: about to fork child process, waiting until server is ready for connections.