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;