PostgreSQL
With Querier, you can integrate with PostgreSQL and execute various queries.
Preparation
Connecting via IP Whitelisting
Add the following IP address to the whitelist in your database's firewall rules:
35.187.200.118
Connecting via SSH Tunneling
Refer to this document to set up a bastion server.
Connection Method
1. Create a new data source connection
- Click the [Resources] tab.
- Click the [Create] button next to [Resources].
- Select [PostgreSQL].
2. Enter the connection information
Common Items
Field | Description |
---|---|
Name | Enter the name of the PostgreSQL connection (e.g., Querier DB ). |
Managed Service | Select None or Cloud SQL . |
Database name | Enter the database name of the PostgreSQL you are connecting to. |
Database username | Enter the database username for the PostgreSQL connection. |
Database password | Enter the password for the PostgreSQL connection. |
🙋♂️ About Managed Service
Querier currently supports connections via Cloud SQL Proxy. If you use Cloud SQL, selecting
Cloud SQL
under [Managed Service] will allow connection via Cloud SQL Proxy.
Otherwise, please selectNone
.
If None
is selected for Managed Service
Field | Description |
---|---|
Host | Enter the host of the PostgreSQL connection. |
Port | Enter the port for the PostgreSQL connection (e.g., 3306 ). |
If Cloud SQL
is selected for Managed Service
Field | Description |
---|---|
Project ID | Enter the Project ID for the GCP where Cloud SQL is set up. |
Instance name | Enter the instance name of the Cloud SQL you are connecting to. |
Region | Enter the region of the Cloud SQL (e.g., asia-northeast1 ). |
Credentials JSON | Enter the service account for the GCP where Cloud SQL is set up in JSON format. |
🙋♂️ Required Permissions for the Service Account
The service account must have one of the following permissions:
- Cloud SQL Client
- Cloud SQL Editor
- Cloud SQL Admin
When SSL connection is enabled
Field | Description |
---|---|
CA Certificate | Upload the CA certificate file. |
Client Key | Upload the client key file. |
Client Certificate | Upload the client certificate file. |
Verification mode | Select the verification method. |
3. Set Up a Bastion Server
If you are connecting via a bastion server, follow these additional steps. Otherwise, skip this section.
- Check [Set up a bastion server].
- Select the bastion server you set up during the preparation.