DB ::异常:默认值:身份验证失败[ClickHouse]

发布于 2025-01-19 00:59:17 字数 470 浏览 4 评论 0原文

我用 1 个分片创建 CH 并创建一些数据库和表,然后将集群更改为有 2 个分片。分片 2 已启动并拥有所有表,但是当我使用此查询时出现错误:

SELECT hostname() 从tutorial.visits_all

收到来自服务器的异常(版本21.3.20): 代码:516。 DB::Exception:从 localhost:9000 接收。 DB::异常:从 chi-repl-05-replicated-0-0:9000 收到。 DB::Exception: 默认:身份验证失败:密码不正确或不存在具有该名称的用户。

我确信我的密码是正确的,并且我使用此命令 clickhouse-client -h clickhouse-repl-05.rezvani-prom.svc --password qwerty --query "select hostname() fromtutorial.visits_all"

任何人都可以帮助我请

谢谢

I Create CH with 1 shard and create some db and tables then i change my cluster to have 2 shard. shard 2 started and have all of tables but when i use this query i get error:

SELECT hostname()
FROM tutorial.visits_all

Received exception from server (version 21.3.20):
Code: 516. DB::Exception: Received from localhost:9000. DB::Exception: Received from chi-repl-05-replicated-0-0:9000. DB::Exception: default: Authentication failed: password is incorrect or there is no user with such name.

I'm sure my password is correct and i use this command clickhouse-client -h clickhouse-repl-05.rezvani-prom.svc --password qwerty --query "select hostname() from tutorial.visits_all"

Can anyone help me please

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

紫竹語嫣☆ 2025-01-26 00:59:17

分布式查询使用默认用户连接到其他分片。
有选项

  1. 从默认用户中删除密码并设置<网络>默认用户的限制。
  2. 中使用相同的密码
  3. 设置默认用户的密码并在remote_servers setup < 秘密>对于remote_servers,
  4. 设置另一个用户并在remote_servers
  5. host_regexp中使用该用户,以防操作员

https://github.com/Altinity/clickhouse-operator/issues?q=is%3Aissue+is%3Aopen+host_regexp

Distributed queries use default user to connect to other shards.
There are options

  1. remove password from default user and setup < network > restriction for default user.
  2. setup password for default user and use the same password in remote_servers
  3. setup < secret > for remote_servers
  4. setup another user and use this user in remote_servers
  5. host_regexp in case of operator

https://github.com/Altinity/clickhouse-operator/issues?q=is%3Aissue+is%3Aopen+host_regexp

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文