Assign Database Access Levels

Assign Access Levels to Users by Assigning Roles

Now that database roles have been created, the DBA can create database users and grant access to the database. Each user can then be assigned to an existing role. The user will then inherit the access privileges granted to that role.

For example:

CREATE USER coach_user PASSWORD 'CoAc4u$er';
GRANT coach_role TO coach_user;

CREATE USER player_user PASSWORD '!P1ay3ru$er';
GRANT player_role TO player_user;

CREATE USER fan_user PASSWORD 'password1';
GRANT fan_role TO fan_user;

Assigning Access Levels Directly to Users

GRANT INSERT, UPDATE, DELETE, SELECT ON players TO coach_user;
GRANT SELECT,INSERT, UPDATE ON scoring TO player_user;
GRANT SELECT ON teams TO fan_user;
COMMIT;

Changing Passwords

NuoDB does not enforce changing passwords. However, users should change their passwords periodically. Use the ALTER USER command to change a user password.

ALTER USER fan_user PASSWORD 'passwd2';