Skip to content

2. Create a New Role and Some Users

The next step is to create a role and some users. Continue to use your initial login credentials for this step, which will give you the privileges of the consumer role. This role includes permissions to alter, create, drop, and view roles and users. (Alternatively, you could use the predefined securityadmin or useradmin role.)

  1. Click the "cube" icon, then Access Control > Roles > + Role. Create a role called analyst, with no membership in any existing roles and no members. Do not select a default cluster.

For example:

  1. Go to Access Control > Users > + User and create two users who belong to the analyst role: ybtools10 and ybapps10.

Do not include @******.com in the user names; these users will not be connecting to Yellowbrick Manager. Be sure to give each user a password that you can remember. Set the default cluster for both users to large-default-cluster.

For example:

You now have two login users: ybtools10 and ybapps10 (both members of the new analyst role). The next step is to grant additional privileges to these users.

  1. In the Query Editor, grant USAGE on the two clusters you created to the analyst role.

For example:

(Run these commands on the default cluster or the currently running cluster.)

You may also want to set the search_path for these users. For example:

alter user ybtools10 set search_path to premdb;
  1. Optionally, verify that the GRANT and ALTER USER commands worked by logging into ybsql as ybtools10:
% ybsql -h ***************** -U ybtools10 -W -d premdb
Password for user ybtools10: 
ybsql (6.0.0)
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type:  \h for help with SQL commands
       \? for help with ybsql commands
       \g or terminate with semicolon to execute query
       \q to quit
premdb=> select current_cluster();
    current_cluster    
-----------------------
 large-default-cluster
(1 row)

Set the -h option to your specific host name. If you need more details to complete this step, see Connecting Tools and Applications.

Parent topic:Tutorial: Creating and Using Clusters