General information¶
About connection properties for CrateDB.
To connect to CrateDB properly, your application or driver needs to be configured with corresponding connection properties. Please note that different applications and drivers may obtain connection properties in different formats.
Connection properties
- Host:
<cluster>.cratedb.net- Port:
5432 (PostgreSQL) or
4200 (HTTP)- User:
<user>- Pass:
<password>
Connection-string examples
Native PostgreSQL, psql
postgresql://<user>:<password>@<cluster>.cratedb.net:5432/
JDBC: PostgreSQL pgJDBC
jdbc:postgresql://<cluster>.cratedb.net:5432/?user=<user>&password=<password>
JDBC: CrateDB JDBC, e.g. Apache Flink
jdbc:crate://<cluster>.cratedb.net:5432/?user=<user>&password=<password>
HTTP: Admin UI, CLI, CrateDB drivers
https://<user>:<password>@<cluster>.cratedb.net:4200/
SQLAlchemy
crate://<user>:<password>@<cluster>.cratedb.net:4200/?schema=doc&ssl=true
Connection properties
- Host:
localhost
- Port:
5432 (PostgreSQL) or
4200 (HTTP)- User:
crate- Pass:
(empty)
Connection-string examples
Native PostgreSQL, psql
postgresql://crate@localhost:5432/
JDBC: PostgreSQL pgJDBC
jdbc:postgresql://localhost:5432/?user=crate
JDBC: CrateDB JDBC, e.g. Apache Flink
jdbc:crate://localhost:5432/?user=<user>&password=<password>
HTTP: Admin UI, CLI, CrateDB drivers
http://crate@localhost:4200/
SQLAlchemy
crate://crate@localhost:4200/?schema=doc
Notes
CrateDB’s fixed catalog name is
crate, the default schema name isdoc.CrateDB does not implement the notion of a database, however tables can be created in different schemas.
When asked for a database name, specifying a schema name (any), or the fixed catalog name
cratemay be applicable.If a database-/schema-name is omitted while connecting, the PostgreSQL drivers may default to the “username”.
The predefined superuser on an unconfigured CrateDB cluster is called
crate, defined without a password.For authenticating properly, please learn about the available authentication options.