In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
When mongo3.03 enables auth authentication, there will be some problems that did not exist in previous versions, such as the addition of SCRAM-SHA-1 verification method to mongodb after 3.03.
The day before yesterday, I found that the newly built mongo development was not connected. I used the software to test if it was due to ip restrictions, and then it wasn't, but I noticed that there was an authentication option, one is SCRAM-SHA-1 and the other is mongodb-cr. I found out if it was due to authentication, so I looked at the new version of mongo3.03 and found that it was.
> db.system.users.find ()
{"_ id": "xxx.xxx", "user": "xxx", "db": "xxx", "credentials": {"SCRAM-SHA-1": {"iterationCount": 10000, "salt": "Ixxxxxxxxxxxx", "storedKey": "xxxxxxxxxxxxx", "serverKey": "xxxxxxxxxxxxxxxx"}}, "roles": [{"role": "userAdminAnyDatabase" "db": "xxxxxx"}]}
Close mongo
Cancel authentication and enable mongodb
> use admin
Switched to db admin
> var schema = db.system.version.findOne ({"_ id": "authSchema"})
> schema.currentVersion = 3
three
> db.system.version.save (schema)
WriteResult ({"nMatched": 1, "nUpserted": 0, "nModified": 1})
Then delete the previously created user
> use userdb
Switched to db userdb
> db.dropUser ("xxxxx")
True
Then create a user and then view that the user will display
{"_ id": "xxx.xxx", "user": "xxx", "db": "xxx", "credentials": {"MONGODB-CR": {"iterationCount": 10000, "salt": "Ixxxxxxxxxxxx", "storedKey": "xxxxxxxxxxxxx", "serverKey": "xxxxxxxxxxxxxxxx"}}, "roles": [{"role": "userAdminAnyDatabase" "db": "xxxxxx"}]}
Restart mongodb and you can use it.
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: 228
*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.