This is the implementation of the Google Cloud SQL data handler for MindsDB. Cloud SQL is a fully-managed database service that makes it easy to set up, maintain, manage, and administer your relational PostgreSQL, MySQL, and SQL Server databases in the cloud.Documentation Index
Fetch the complete documentation index at: https://docs.mindsdb.com/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before proceeding, ensure the following prerequisites are met:- Install MindsDB locally via Docker or Docker Desktop.
- To connect Google Cloud SQL to MindsDB, install the required dependencies following this instruction.
- Install or ensure access to Google Cloud SQL.
Implementation
This handler was implemented using the existing MindsDB handlers for MySQL, PostgreSQL and SQL Server. The required arguments to establish a connection are,host: the host name or IP address of the Google Cloud SQL instance.port: the TCP/IP port of the Google Cloud SQL instance.user: the username used to authenticate with the Google Cloud SQL instance.password: the password to authenticate the user with the Google Cloud SQL instance.database: the database name to use when connecting with the Google Cloud SQL instance.db_engine: the database engine of the Google Cloud SQL instance. This can take one of three values: ‘mysql’, ‘postgresql’ or ‘mssql’.
Usage
In order to make use of this handler and connect to the Google Cloud SQL instance, you need to create a datasource with the following syntax:- Go to the Cloud SQL Instances page.
- Click on the instance you want to add authorized networks to.
- Click on the Connections tab.
- Click on Networking tab.
- Click on Add network.
- Enter the IP address of the machine you want to connect from.
18.220.205.95 3.19.152.46 52.14.91.162
You can use this established connection to query your table as follows: