Materialize Logo

CLI Connections

You can connect to a running materialized process from your favorite shell using a compatible command-line client.

Connection details

Detail Info
Database materialize
User Any valid role (usually materialize)
Port 6875
SSL Not supported yet

Materialize instances have a user named materialize installed, unless you drop this user with DROP USER. You can add additional users with CREATE ROLE.

Changed in v0.7.0: Materialize requires that you name a valid user when you connect. Previously, Materialize did not support the concept of roles, so it accepted all user names.

Supported tools

Tool Description Install
mzcli Materialize-specific CLI GitHub
psql Vanilla PostgreSQL CLI tool postgresql or postgresql-client
WARNING! Not all features of psql are supported by Materialize.

Other tools built for PostgreSQL can often be made to work with Materialize with minor modifications, but are unlikely to work out of the box. File a GitHub issue if there is a PostgreSQL tool you would like us to consider supporting.

Examples

mzcli example

You can connect to materialized with mzcli using:

mzcli -h <host>

psql example

You could use any of the following formats 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
Did this info help?
Yes No