Skip to content
Install

Add database users

Apps in the project connect as the owner user, which owns the database and can change anything in it. To give a tool or a person a login with less access, add a database user. For example, create a read-only user for a reporting tool, so that it cannot change data even if its credentials leak. You cannot remove the owner user.

  • Edit access to the project: the Admin or Member project role.
  • A dedicated database.
  1. Open the database.
  2. Go to Settings > Users.
  3. Select Add user.
  4. In Name, enter a name for the user.
  5. In Access, select Read only or Read and write.
  6. Select Add user.
  7. Copy the Password and Connection string.
  8. Select Done.

A username must follow these rules:

  • It has 2 to 41 characters.
  • It starts with a lowercase letter.
  • It contains only lowercase letters, digits, and underscores.
  • It does not start with pg_ or cnpg_.
  • It is not the owner user or another reserved name.
  1. Open the database.
  2. Go to Settings > Users.

Removing a user disconnects all sessions that use the login, and the login stops working.

  1. Open the database.
  2. Go to Settings > Users.
  3. On the user, select the delete icon.
  4. Select Remove user.