Changing default access and secret key in MongoDB
You can change default access and the secret key in MongoDB.
About this task
To change the default access and secret key, complete the following steps.
":" (colon) is a restricted character and not allowed in the access key or secret key. |
Steps
-
Connect to MongoDB by entering the following command:
mongo --host <mongo-host> --port <mongo-port> --authenticationDatabase admin -u absuser -p abs123
absuser
andabs123
are the default username and password for MongoDB. -
On the MongoDB prompt, run the following command:
use abs_metadata db.auth_info.updateOne( { access_key: "<new-access-key>", secret_key: "<new-secret-key>"} )