From 9dc76afd77849bb8c51ed6e187c16ed4d6e7368b Mon Sep 17 00:00:00 2001 From: rainbow napkin Date: Sat, 7 Dec 2024 20:14:10 +0000 Subject: [PATCH] Update mongodb debian --- mongodb-debian.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/mongodb-debian.md b/mongodb-debian.md index b54f77b..0a14470 100644 --- a/mongodb-debian.md +++ b/mongodb-debian.md @@ -30,6 +30,20 @@ db.createUser( security: authorization: enabled ``` -5. Restart `mongod` with `sudo systemctl restart mongod` -6. Drop back into `mongosh` with authentication `mongosh -u 'admin'`, entering the password on prompt +### Setting up the Canopy User/DB +1. Restart `mongod` with `sudo systemctl restart mongod` +2. Drop back into `mongosh` with authentication `mongosh -u 'admin'`, entering the password on prompt +3. Switch over to the admin database `use admin` +4. Create the canopy user: +``` +db.createUser( + { + user: "canopy", + pwd: passwordPrompt(), + roles: [ + { role: "dbOwner", db: "canopy" }, + ] + } +) +```