Skip to main content
Skip to main content

Connect QStudio to ClickHouse

Community Maintained

QStudio is a free SQL GUI, it allows running SQL scripts, easy browsing of tables, charting and exporting of results. It works on every operating system, with every database.

QStudio connects to ClickHouse using JDBC.

1. Gather your ClickHouse details

QStudio uses JDBC over HTTP(S) to connect to ClickHouse; you need:

  • endpoint
  • port number
  • username
  • password

To connect to ClickHouse with HTTP(S) you need this information:

Parameter(s)Description
HOST and PORTTypically, the port is 8443 when using TLS or 8123 when not using TLS.
DATABASE NAMEOut of the box, there is a database named default, use the name of the database that you want to connect to.
USERNAME and PASSWORDOut of the box, the username is default. Use the username appropriate for your use case.

The details for your ClickHouse Cloud service are available in the ClickHouse Cloud console. Select a service and click Connect:

Choose HTTPS. Connection details are displayed in an example curl command.

If you are using self-managed ClickHouse, the connection details are set by your ClickHouse administrator.

2. Download QStudio

QStudio is available at https://www.timestored.com/qstudio/download/

3. Add a database

  • When you first open QStudio click on the menu options Server->Add Server or on the add server button on the toolbar.
  • Then set the details:
  1. Server Type: Clickhouse.com
  2. Note for Host you MUST include https:// Host: https://abc.def.clickhouse.cloud Port: 8443
  3. Username: default Password: XXXXXXXXXXX
  4. Click Add

If QStudio detects that you do not have the ClickHouse JDBC driver installed, it will offer to download them for you:

4. Query ClickHouse

  • Open a query editor and run a query. You can run queries by

  • Ctrl + e - Runs highlighted text

  • Ctrl + Enter - Runs the current line

  • An example query:

Next steps

See QStudio to learn about the capabilities of QStudio, and the ClickHouse documentation to learn about the capabilities of ClickHouse.