首页 > 其他分享 >clickhouse 添加只读账户

clickhouse 添加只读账户

时间:2022-11-15 12:33:20浏览次数:45  
标签:grant read create 只读 添加 role select clickhouse

vi /etc/clickhouse-server/user.xml
<access_management>1</access_management>

 

clickhouse-client -m -h 127.0.0.1 -u default --password

create user zhangsan identified with sha256_password by '5552223333' host any;
select * from system.users FORMAT Vertical;

grant select on `ad_app`.* to zhangsan@'%' ;
exit;

------------------------------------------------------------------------------------
创建角色:create role read_role;
给角色授权:grant all on readonly.* to read_role;
给用户授权:grant read_role to zhangquanyuan;

标签:grant,read,create,只读,添加,role,select,clickhouse
From: https://www.cnblogs.com/walkersss/p/16892030.html

相关文章