DB::Exception: default: Authentication failed: password is incorrect, or there is no user with such name

Hi Team,

With PMM 3.2.0, we are unable to connect to ClickHouseDB. Every time I try using the default user and empty password, I receive the error below. But with 2.44, I was able to connect the ClickHouseDB with an empty password.

Error Details:

[root@tppmm101 ~]# docker exec -t -i 1628b1e06a1c clickhouse-client --user=default --password
ClickHouse client version 23.8.2.7 (official build).
Password for user (default):
Connecting to localhost:9000 as user default.
Code: 516. DB::Exception: Received from localhost:9000. DB::Exception: default: Authentication failed: password is incorrect, or there is no user with such name.

If you have installed ClickHouse and forgot password you can reset it in the configuration file.
The password for default user is typically located at /etc/clickhouse-server/users.d/default-password.xml
and deleting this file will reset the password.
See also /etc/clickhouse-server/users.xml on the server where ClickHouse is installed.

. (AUTHENTICATION_FAILED)

[root@tppmm101 ~]# docker exec -t -i 5628b1e06a1c clickhouse-client --user=default --password
ClickHouse client version 23.8.2.7 (official build).
Password for user (default):
Connecting to localhost:9000 as user default.
Code: 516. DB::Exception: Received from localhost:9000. DB::Exception: default: Authentication failed: password is incorrect, or there is no user with such name.

If you have installed ClickHouse and forgot password you can reset it in the configuration file.
The password for default user is typically located at /etc/clickhouse-server/users.d/default-password.xml
and deleting this file will reset the password.
See also /etc/clickhouse-server/users.xml on the server where ClickHouse is installed.

. (AUTHENTICATION_FAILED)

[root@tppmm101 ~]#

You can try the default password as clickhouse.

[pmm@7da189e5569b opt] # cat /etc/clickhouse-server/users.xml | grep -i password_sha256_hex |tail -n 1
            <password_sha256_hex>7e099f39b84ea79559b3e85ea046804e63725fd1f46b37f281276aae20f86dc3</password_sha256_hex>

[pmm@7da189e5569b opt] # echo -n "clickhouse" | sha256sum | tr -d '-'
7e099f39b84ea79559b3e85ea046804e63725fd1f46b37f281276aae20f86dc3

[pmm@7da189e5569b opt] # clickhouse-client --host 127.0.0.1 --user=default --password=clickhouse
<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
<jemalloc>: (This is the expected behaviour if you are running under QEMU)
ClickHouse client version 23.8.2.7 (official build).
Connecting to 127.0.0.1:9000 as user default.
Connected to ClickHouse server version 23.8.2 revision 54465.

7da189e5569b :)
1 Like

Thank you so much. @Abhinav_Gupta.

It’s working fine now.

1 Like