ClickHouse Client
For connecting the ClickHouse database remotely, the hostname, the port for secure connection and the default user’s password should be known.
- The “default” user’s password is specified by the user in the cluster creation phase (as shown below).
- After the cluster is created, the hostname can be reached from the cluster page under “Workspace.”
- At last, a port for secure connection should be known. Native protocol SSL/TLS port for clickhouse is 9440.
Examples
An example for connecting cluster with clickhouse-client is:
clickhouse-client --host <your_host_name> --port 9440 --password <your_password> --secure
Another example for python connection is:
from clickhouse_driver import Client
##configure ClickHouse connection
client = Client(host='your_host_name', port='9440',secure=True, database='default', user='default', password='your_password')