From dd4e79f0dcd1d3c09b7da633bc03ef5335b46da3 Mon Sep 17 00:00:00 2001 From: rainbow napkin Date: Sat, 7 Dec 2024 19:55:03 +0000 Subject: [PATCH] Update mongodb debian --- mongodb-debian.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mongodb-debian.md b/mongodb-debian.md index 3ee09e2..c981f92 100644 --- a/mongodb-debian.md +++ b/mongodb-debian.md @@ -13,7 +13,8 @@ 1. Start mongod without authentication and drop into a shell `sudo systemctl start mongod & mongosh` 2. Switch over to the admin database `use admin` 3. Create the administrative user: -```db.createUser( +``` +db.createUser( { user: "myUserAdmin", pwd: passwordPrompt(), // or cleartext password @@ -22,4 +23,5 @@ { role: "readWriteAnyDatabase", db: "admin" } ] } -)``` \ No newline at end of file +) +``` \ No newline at end of file