Skip to navigationSkip to main contentSkip to footerScaleway DocsAsk our AI
Ask our AI

How to manage database users

Users can connect to a database and access its data. Each one has a different set of customizable permissions.

Before you start

To complete the actions presented below, you must have:

How to create a user

  1. Click PostgreSQL and MySQL under Databases on the side menu. A list of your Database Instances displays.

  2. Select the geographical region of the Instance you want to manage from the drop-down.

  3. Click the database name or more icon > More info to access the Database Instance information page.

  4. Go to the Users tab. A list of users displays. If it is the first time you create a user, your list will display the user you set up during the creation of your Database Instance.

  5. Click + Create user to create a new user, if you wish to.

  6. Click toggle icon to grant admin rights to the user.

    Note

    Admin rights allow a user to create logical databases and users. These right do not override the permissions configured for the logical databases. Logical database permissions must be set up in the Permissions tab.

  7. Enter a username and password.

    Note

    Optionally, you can configure the appropriate permissions according to the user. Three types of permissions are available:

    • None: No access to the database,
    • Read: Allow users to read tables and fields in a database,
    • Write: Allow users to write content in databases. You can select the permission type in the Permissions tab.
    Important

    PostgreSQL Permissions are applied to existing items at the moment the configuration is set. They cannot be applied to any items created afterward. When you add database objects like tables or sequences, your configured permissions are automatically set to Custom. The Custom setting ensures that your permissions are still valid for items created before you reconfigured your Database. You can use PostgreSQL default privileges to set default privileges for future objects.

  8. Click Create user to confirm.

    Once the user is created, it is displayed in the user list.

To update the password, the permissions or delete the user, click more icon to display the respective options.

Set permissions for an existing user

Permissions define the actions a user can perform on a logical database. A database user is automatically generated when you create your Database Instance, to whom the permissions are attributed. However, newly created users have no permissions by default.

  1. Click PostgreSQL and MySQL under Databases on the side menu. A list of your Database Instances displays.
  2. Select the geographical region of the Instance you want to manage from the drop-down.
  3. Click the database name or more icon > More info to access the Database Instance information page.
  4. Go to the Users tab. A list of users displays.
  5. Click more icon > Update permissions to open the user permissions panel.
  6. Select the appropriate permissions for each database.
    Note

    Three types of permissions are available:

    • None: No access to the database
    • Read: Allow users to read tables and fields in a database
    • Read/Write: Allow users to read/write content in databases
    • All: Allows the creation of schemas and tables.
  7. Click Update user to confirm.
Still need help?

Create a support ticket
No Results