79478079

Date: 2025-03-01 18:36:53
Score: 1.5
Natty:
Report link

Issue is user is not created I have run below command in docker

docker exec -it {container_name} mongosh use admin

to choose database in which one we will add a custom user. Now we can type already prepared a script with a custom password, username, and roles

db.auth( 'admin', 'adminpassword' ) db.createUser({user: "root", pwd: "password", roles : [{role: "readWrite", db: "product-service"}]});

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Praful Chambalwar