Squadbase logo

JDBC

Steps and required credentials to connect any JDBC-compatible database to Squadbase

Required Information

FieldDescription
JDBC URLThe JDBC connection URL for your database (e.g., jdbc:postgresql://host:5432/db, jdbc:mysql://host:3306/db).
Username (Optional)Database username. Optional when credentials are embedded in the JDBC URL.
Password (Optional)Database password. Optional when credentials are embedded in the JDBC URL.
SSH Tunnel Host (Optional)Hostname of the SSH bastion host to tunnel through. Leave empty to connect directly.
SSH Tunnel Port (Optional)SSH port of the bastion host. Defaults to 22.
SSH Tunnel Username (Optional)Username for SSH authentication. Required when SSH Tunnel Host is set.
SSH Private Key (Optional)Private key (PEM, base64-encoded) for SSH authentication. Required when SSH Tunnel Host is set.
SSH Private Key Passphrase (Optional)Passphrase for the SSH private key, if it is encrypted.

How to Obtain

JDBC URL

The JDBC URL format varies by database type. Common formats are listed below.

DatabaseJDBC URL Format
PostgreSQLjdbc:postgresql://<host>:<port>/<database>?sslmode=require
MySQLjdbc:mysql://<host>:<port>/<database>?useSSL=true
MariaDBjdbc:mariadb://<host>:<port>/<database>?useSsl=true
SQL Serverjdbc:sqlserver://<host>:<port>;database=<database>;encrypt=true
Oraclejdbc:oracle:thin:@<host>:<port>:<sid>

SSL connections are required by many managed database services. Add the necessary parameters according to your service's connection instructions.

The jdbc: prefix may be omitted — Squadbase accepts both jdbc:postgresql://... and postgresql://....

Username / Password (Optional)

Enter the database username and password in the Username and Password fields below the JDBC URL.

SSH Tunnel (Optional)

If your database is on a private network and not directly accessible from the internet, you can connect through an SSH bastion host.

FieldHow to obtain
SSH Tunnel HostThe public hostname or IP address of the SSH bastion server
SSH Tunnel PortThe SSH port of the bastion server (default: 22)
SSH Tunnel UsernameThe username used to authenticate with the bastion server
SSH Private KeyThe private key (PEM format) corresponding to the authorized public key on the bastion server
SSH Private Key PassphraseThe passphrase for the private key, if it is encrypted