JDBC
Steps and required credentials to connect any JDBC-compatible database to Squadbase
Required Information
| Field | Description |
|---|---|
| JDBC URL | The 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.
| Database | JDBC URL Format |
|---|---|
| PostgreSQL | jdbc:postgresql://<host>:<port>/<database>?sslmode=require |
| MySQL | jdbc:mysql://<host>:<port>/<database>?useSSL=true |
| MariaDB | jdbc:mariadb://<host>:<port>/<database>?useSsl=true |
| SQL Server | jdbc:sqlserver://<host>:<port>;database=<database>;encrypt=true |
| Oracle | jdbc: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.
| Field | How to obtain |
|---|---|
| SSH Tunnel Host | The public hostname or IP address of the SSH bastion server |
| SSH Tunnel Port | The SSH port of the bastion server (default: 22) |
| SSH Tunnel Username | The username used to authenticate with the bastion server |
| SSH Private Key | The private key (PEM format) corresponding to the authorized public key on the bastion server |
| SSH Private Key Passphrase | The passphrase for the private key, if it is encrypted |