How to manage a MongoDB® Database Instance user
Users can connect to a database and access its data.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- A valid API key
- A MongoDB® Database Instance
How to create a new user
-
Click MongoDB® Databases under Databases on the side menu. A list of your Database Instances displays.
-
Click the database name to access the Database Instance information page.
-
Go to the Users tab.
-
Click Create user. A pop-up appears.
-
Enter a username and password for the user.
-
Click Create User to confirm. Your user is created. The privilege configuration wizard displays.
-
Set the privileges of your new user. You can select one or both of the following:
-
Global roles - the privileges you set will apply to all your databases, existing and future. You can set one or more global roll at a time. The available global roles include:
- Ready-only (
read
) - Read privileges on all non-system collections and thesystem.js
collection. - Read and write (
read_write
) - Read and write privileges on all non-system collections and thesystem.js
collection. - Sync (
sync
) - Role that aggregates three MongoDB roles:clusterMonitor
,backup
andrestore
. This role can only be granted as a global role - DB admin (
db_admin
) - Privileges to perform administrative tasks on the database, such as schema-related tasks, indexing, and gathering statistics. This role does not grant privileges for user and role management.
- Ready-only (
-
Specific roles - the privileges will only apply to the databases you define. All global roles except
sync
can also be defined as specific roles.
If you set a global role, select one or more roles in the drop-down.
If you set specific roles, enter the database(s) to which you want to apply the role first, then click Set privileges. Check the box corresponding to the role(s) you wish to apply to each database in the list.
-
-
Click Confirm after reviewing your configuration.
The list of your users is updated. You can see an overview of the global and speficic roles next to the name of each user.
How to update user privileges
- Click MongoDB® Databases under Databases on the side menu. A list of your Database Instances displays.
- Click the database name to access the Database Instance information page.
- Go to the Users tab.
- Click more icon, then Update privileges. A pop-up appears.
- Update the privileges according to your preferences, following the instructions described in step 7 of the procedure above.
- Click Update after reviewing your configuration.
How to change user passwords
- Click MongoDB® Databases under Databases on the side menu. A list of your Database Instances displays.
- Click the database name or more icon > More info to access the Database Instance information page.
- Go to the Users tab.
- Click more icon, then Change password. A pop-up appears.
- Enter your new password and confirm.