Code: 516. DB::Exception: Received from localhost:9000. failed: password is incorrect or there is no
在本地测试 ClickHouse 分布式表时,创建分布式表成功,但是查询数据时报错,完整报错如下:
Received exception from server (version 22.3.2):
Code: 516. DB::Exception: Received from localhost:9000. DB::Exception: Received from 192.168.68.123:9000. DB::Exception: default: Authentication failed: password is incorrect or there is no user with such name. (AUTHENTICATION_FAILED)
排查许久后发现,是集群开始安装时设置了密码,而配置分布式表时,没有添加各服务器的用户名和密码,所以访问不到别的服务器的数据,在我们的/etc/clickhouse-server/config.xml
中,加入用户名和密码即可正常查询数据,如下:
修改完成后,分布式表即查询成功:
参考链接
【1】https://blog.csdn.net/u011110301/article/details/117438670
此文章版权归 程序园 所有,如有转载,请注明来自原作者。
评论
ValineDisqus