install clickhouse-client adds a fast CLI for querying ClickHouse from any workstation
clickhouse-client lets you run SQL against a ClickHouse server directly from your terminal, automate reports, and copy data between systems faster than GUI tools.
You need an x64 machine, network access to the ClickHouse server’s TCP (9000) or HTTP (8123) port, and root or Administrator privileges for installation.
sudo apt-get install -y clickhouse-client
installs the latest client from your distro repo.For official builds add Yandex repo first.
sudo yum install -y clickhouse-client
or with DNF on Fedora. Ensure /etc/yum.repos.d/ClickHouse.repo
points to the right major version.
Use Homebrew: brew install clickhouse
.Brew taps the official Altinity formula and pulls both server and client; only the client binary is needed to connect.
Download the pre-built ZIP from the ClickHouse releases page, unzip, and add the folder containing clickhouse-client.exe
to your PATH. Or use choco install clickhouse-client
.
Run clickhouse-client --version
. You should see the semantic version string.Then connect: clickhouse-client -h localhost --query "SELECT 1"
.
clickhouse-client --host db.example.com --user analyst --password secret --database ecommerce
drops you into an interactive prompt where you can query tables like Customers, Orders, and OrderItems.
Create a ~/.clickhouse-client/config.xml
with default host, port, and user to avoid typing them. Use --query
for scripts and CI, and pipe output to CSV for downstream tools.
.
Yes, server packages bundle the client, but you can install the lightweight client-only package to reduce footprint.
Yes. docker run --rm -it clickhouse/clickhouse-client --host my-server
launches a disposable client container.
Use --secure
to enable TLS. Ensure the server is configured with valid certificates or set --tls_skip_verify
for testing.