Creating a Database and Password

Admitting that the admin user is named admin and that the password for the admin user is password123, the mongo command-line can be reached by executing the following command:

mongo -u admin -p password123

The following instructions in succession can then be used to create a database and then a user named test with the password also test and with ownership rights granted on the database main:

use main
db
db.createUser({user: "main", pwd: "main", roles: [{role: "dbOwner", db: "main"}]});

fuss/mongodb.txt ยท Last modified: 2024/11/14 12:32 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.