How to create a readonly user


#1

is it possible to create readonly user in mapd core CE?


#2

Hi @shovon,

yes and it’s quite straightforward task

e.g.
with a super user (mapd as example) create a user

create user u_read_only (password = ‘ro’);

then grant him the access to database and a select privilege on it

grant access on database mapd to u_read_only;
grant select on database madp to u_read_only;

Anyway is preferable to user roles, so define a role and grant it to the user
create role mapd_readonly;
grant access on database mapd to mapd_readonly;
grant select on database mapd to mapd_readonly;
grant mapd_readonly to u_read_only;

You can refere to docs about roles and privileges here

http://docs.mapd.com/latest/5_roles.html