...
Code Block | ||
---|---|---|
| ||
C:\>mongo --authenticationDatabase admin>mongosh -u bvq -p P@ssw0rd MongoDBCurrent Mongosh shellLog version v4.4.3 connectingID: 65e5f78046a15fbd5382738d Connecting to: mongodb://127<credentials>@127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodbdirectConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.1.5 Using MongoDB: 6.0.11 Using Mongosh: 2.1.5 For mongosh info see: https://docs.mongodb.com/mongodb-shell/ |
- Switch to db admin
Code Block | ||
---|---|---|
| ||
> use admin switched to db admin> |
...
Code Block | ||
---|---|---|
| ||
C:\>mongo>mongosh --host IPLOCALHOST--authenticationDatabase admin -u bvq -p NEW_PASSWORD MongoDB shell version v4.4.3 connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb |
...