Skip to main content

qstudio

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.

Connect QStudio to ClickHouse

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:

  • The HOST and PORT: typically, the port is 8443 when using TLS or 8123 when not using TLS.

  • The DATABASE NAME: out of the box, there is a database named default, use the name of the database that you want to connect to.

  • The USERNAME and PASSWORD: out 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 the service that you will connect to and click Connect:

ClickHouse Cloud service connect button

Choose HTTPS, and the details are available in an example curl command.

ClickHouse Cloud HTTPS connection details

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:

Configure a new database

  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:

    A sample query

Next Steps

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