Connect to Materialize via a SQL CLI

You can connect to Materialize 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
Host <host>
Port 6875
User <user>
Database materialize

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!

Installation instructions for psql

Start by checking if you have psql installed:

psql --version

macOS installation

Assuming you’ve installed Homebrew:

brew install libpq

Then symlink the psql binary to your /usr/local/bin directory:

brew link --force libpq

Linux installation

For Debian-based distributions:

sudo apt-get update
sudo apt-get install postgresql-client

The postgresql-client package includes only the client binaries, not the PostgreSQL server.

For other Linux distributions, check out the PostgreSQL documentation.

Windows installation

For Windows, it is best to use the PostgreSQL installer certified by EDB.

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 formats to connect to Materialize with psql:

psql "postgres://<user>@<host>:6875/materialize"
psql -U <user> -h <host> -p 6875 materialize
psql -U <user> -h <host> -p 6875 -d materialize
Back to top ↑