Zoran Pandovski
By Zoran Pandovski

ClickHouse Code 516. DB::Exception

ClickHouse Code 516. DB::Exception

ClickHouse provides a command line tool for connecting to the ClickHouse database called clickhouse-client. Following the official documentation, you need to run clickhouse-client to successfully connect to ClickHouse server.

But on the first attempt, you will usually get the following exception:

1
2
3
Code: 516. DB::Exception: Received from localhost:9000. DB::Exception: default: Authentication failed: password is incorrect or there is no user with such name.

That’s because the first time you installed ClickHouse you have entered the default password so you must provide that one as an argument to the clickhouse-client e.g

1
2
3
clickhouse-client --password=your-password 

And now, you should get a successful connection message:

1
2
3
4
5
6
7
ClickHouse client version 20.4.2.9 (official build).

Connecting to localhost:9000 as user default.

Connected to ClickHouse server version 20.4.2 revision 54434.