MySQL
With Querier, you can integrate with MySQL 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
Please 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 [MySQL].
2. Enter the connection information
Common Items
Field | Description |
---|---|
Name | Enter the name of the MySQL connection (e.g., Querier DB ). |
Managed service | Select None or Cloud SQL . |
Database name | Enter the database name of the MySQL you are connecting to. |
Database username | Enter the database username for the MySQL connection. |
Database password | Enter the password for the MySQL connection. |
🙋♂️ About Managed Service
Currently, Querier supports connections via Cloud SQL Proxy. If you use Cloud SQL, select
Cloud SQL
under [Managed Service] to connect via Cloud SQL Proxy.
If not, please chooseNone
.
If None
is selected for Managed Service
Field | Description |
---|---|
Host | Enter the host of the MySQL connection. |
Port | Enter the port for the MySQL 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. If not, skip this section.
- Check [Set up a bastion server].
- Select the bastion server you set up during the preparation.