Reputation: 385
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
Upvotes: 4
Views: 14126
Reputation: 385
Distributed queries use default user to connect to other shards. There are options
https://github.com/Altinity/clickhouse-operator/issues?q=is%3Aissue+is%3Aopen+host_regexp
Upvotes: 5