clickhouse 创建分布式表(distributed)查询报DB::Exception: default: Authentication failed: password is incorrect or there is no user with such name.

创建分布式表:
create
table IF NOT EXISTS hdfs_sex_csv1 ON CLUSTER enic_cluster ( id Int8, gender String, date Date )Engine=Distributed(enic_cluster, default, hdfs_sex_csv);
执行查询:
select  * from hdfs_sex_csv1;
报错信息:
DB::Exception: default: Authentication failed: password is incorrect or there is no user with such name.

 

 

 

 解决:

在配置文件metrika.xml(或者config.xml)文件中增加配置:

<enic_cluster>
            <shard>
                <replica>
                    <host>190.***.***.175</host>
                    <port>9000</port>
                    <user>default</user>
                    <password>okE7heh7</password>
                </replica>
            </shard>
            <shard>
                <replica>
                    <host>190.***.***.176</host>
                    <port>9000</port>
                    <user>default</user>
                    <password>okE7heh7</password>
                </replica>
            </shard>
            <shard>
                <replica>
                    <host>190.***.***.177</host>
                    <port>9000</port>
                    <user>default</user>
                    <password>okE7heh7</password>
                </replica>
            </shard>
        </enic_cluster>

 

posted @ 2022-06-27 17:09  shan_zhayidian  阅读(2990)  评论(0编辑  收藏  举报