Connecting to a ClickHouse Cluster

Now that you’ve created a cluster, it’s time to connect your application to your new ClickHouse cluster. Aside from setting your firewall rules, Instaclustr provides a few examples (customised to your cluster) for the wide selection of client libraries ClickHouse supports, to help you through this process.  

  1. After your cluster has finished provisioning, navigate to your Cluster Details page. All your nodes should be in a Running state with no errors listed. Depending on your cluster configuration, nodes may be allocated both public and private IP addresses or only private ones, and these addresses will be listed next to the nodes.  We suggest that if your application is running within the same data centre as your cluster, you investigate configuring your client to connect to the private addresses. Please visit our guide on Private Network Clusters for more details. 
  2. Instaclustr manages the firewall rules for the nodes in your cluster. Each cluster node only allows connections from one or more trusted IP addresses. You can configure this by clicking on Firewall Rules from the sidebar. 
  3. Under the Firewall Rules section, enter any additional IP addresses you wish to trust connecting to the ClickHouse Allowed Client Addresses and ClickHouse Allowed Web UI Addresses then save your changes.
  4. The ClickHouse Connection Info page, accessible from the sidebar of the console, contains a list of your node addresses, authentication credentials to connect to your cluster, and a few connection examples using some of the popular ClickHouse clients: 
    1. Java
    2. ClickHouse client
  5. Instaclustr provides a default icclickhouse user for connecting to the cluster. It is strongly recommended that you change the password for it and create additional users with the least possible privileges to carry out your routine operations on the cluster. 
    1. For connecting to the cluster, you can either use SDK for different languages, such as the Java example supplied above; use the ClickHouse client in a command line terminal; or simply visit the ClickHouse Web URL on the connection info page with the icclickhouse user credentials. 
    2. For changing the default user password, simply connect to your cluster and execute the ALTER USER command. Example:
    3. For adding new users, simply execute the CREATE USER command to create a new user. Example:

By Instaclustr Support
Need Support?
Experiencing difficulties on the website or console?
Already have an account?
Need help with your cluster?
Contact Support
Why sign up?
To experience the ease of creating and managing clusters via the Instaclustr Console
Spin up a cluster in minutes