In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Root users report an error when modifying the MongoDB authentication mechanism:
> use admin
> db.auth ('root','123456')
> var schema=db.system.version.findOne ({"_ id": "authSchema"})
Y > schema.currentVersion = 3
three
> db.system.version.save (schema)
WriteResult ({
"writeError": {
"code": 13
"errmsg": "not authorized on root to execute command {update:\" system.version\ ", updates: [{Q: {_ id:\" authSchema\ "}, u: {_ id:\" authSchema\ ", currentVersion: 3}, multi: false, upsert: true}], ordered: true}"
}
})
This error is due to the fact that the admin user is not authorized to execute commands on the system.version table. The workaround is as follows:
> db.grantRolesToUser ("root", [{role: "_ system", db: "admin"}])
The command was executed again successfully:
> db.system.version.findOne ({"_ id": "authSchema"})
{"_ id": "authSchema", "currentVersion": 3}
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.