Materialize Documentation
s
Join the Community github/materialize

Connect to Materialize via a SQL CLI

You can connect to a running Materialize instance using a PostgreSQL-compatible client, like psql. For an overview of compatible SQL clients and their current level of support, check out Tools and Integrations.

Connection details

Detail Info
Database materialize
User Any valid role (default: materialize)
Port 6875
SSL/TLS If enabled

Materialize instances have a default user named materialize installed. You can manage users using the DROP USER and CREATE USER statements.

Supported tools

Tool Description Install
psql Vanilla PostgreSQL CLI postgresql or postgresql-client
DBeaver Open source universal SQL CLI Download DBeaver

If there’s a tool that you’d like to use with Materialize but is not listed here or in Tools and Integrations, let us know by submitting a feature request!

Examples

Connecting with psql

WARNING! Not all features of psql are supported by Materialize yet, including some backslash meta-commands (#9721).

You can use any of the following connection string format to connect to materialized with psql:

psql postgres://materialize@<host>:6875/materialize
psql -U materialize -h <host> -p 6875 materialize
psql -U materialize -h <host> -p 6875 -d materialize
psql user=materialize host=<host> port=6875 dbname=materialize

Docker

For Docker environments, we provide the materialize/cli image, which bundles psql and can be used to spin up a minimal docker-compose setup:

services:
  materialized:
    image: materialize/materialized:v0.26.6
    ports:
      - "6875:6875"
  cli:
    image: materialize/cli:v0.26.6