Update mongodb debian
parent
1b3aa9d318
commit
dd4e79f0dc
|
|
@ -13,7 +13,8 @@
|
||||||
1. Start mongod without authentication and drop into a shell `sudo systemctl start mongod & mongosh`
|
1. Start mongod without authentication and drop into a shell `sudo systemctl start mongod & mongosh`
|
||||||
2. Switch over to the admin database `use admin`
|
2. Switch over to the admin database `use admin`
|
||||||
3. Create the administrative user:
|
3. Create the administrative user:
|
||||||
```db.createUser(
|
```
|
||||||
|
db.createUser(
|
||||||
{
|
{
|
||||||
user: "myUserAdmin",
|
user: "myUserAdmin",
|
||||||
pwd: passwordPrompt(), // or cleartext password
|
pwd: passwordPrompt(), // or cleartext password
|
||||||
|
|
@ -22,4 +23,5 @@
|
||||||
{ role: "readWriteAnyDatabase", db: "admin" }
|
{ role: "readWriteAnyDatabase", db: "admin" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
)```
|
)
|
||||||
|
```
|
||||||
Loading…
Reference in a new issue