1、检查default用户是否开启赋予权限的能力。也就是 .....(自己安装路径)/clickhouse-server/users.xml下看看
<!-- User can create other users and grant rights to them. -->
<access_management>1</access_management> 的注释去掉
2、 创建用户:
create user ck_reader if not exists identified with sha256_password by 'ck_reader' host any;
3、创建角色
create role if not exists reader;
4、赋予角色权限
GRANT SELECT ON *.* TO reader;
5、分配角色给用户
GRANT reader TO ck_reader;