How to manage database users

You can add and remove users, as well as manage their individual settings.

Getting a list of users

  1. Go to the folder page and click Managed Service for ClickHouse.
  2. Click on the name of the cluster you need and then select the Users tab.

If you don't have the Yandex.Cloud command line interface yet, install it.

The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id flag.

To get a list of cluster users, run the command:

$ yc managed-clickhouse user list
     --cluster-name=<cluster name>

The cluster name can be requested with a list of folder clusters.

Adding users

  1. Go to the folder page and click Managed Service for ClickHouse.
  2. Click on the name of the cluster you need and select the tab Users.
  3. Click Add.
  4. Enter the database user name and password (from 8 to 128 characters).

If you don't have the Yandex.Cloud command line interface yet, install it.

The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id flag.

To create a user in a cluster, run the command:

$ yc managed-clickhouse user create <user name>
     --cluster-name=<cluster name>
     --password=<DB user password>
     --permissions=<list of DBs the user can access>

The cluster name can be requested with a list of folder clusters.

Updating users

In the management console, you can only change the password of a database user:

  1. Go to the folder page and click Managed Service for ClickHouse.
  2. Click on the name of the cluster you need and select the tab Users.
  3. Click image and select Change password.

If you don't have the Yandex.Cloud command line interface yet, install it.

The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id flag.

To change the user's password or the list of databases available to the user, run:

$ yc managed-clickhouse user update <user name>
     --cluster-name=<cluster name>
     --password=<DB user password>
     --permissions=<list of DBs the user can access>

The cluster name can be requested with a list of folder clusters.

Removing a user

  1. Go to the folder page and click Managed Service for ClickHouse.
  2. Click on the name of the cluster you need and select the tab Users.
  3. Click image and select Delete.

If you don't have the Yandex.Cloud command line interface yet, install it.

The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id flag.

To remove a user, run:

$ yc managed-clickhouse user delete <user name>
     --cluster-name=<cluster name>

The cluster name can be requested with a list of folder clusters.