In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 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: 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.