You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLOUD-SQL-MYSQL.md
+34-2Lines changed: 34 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,10 @@ software delivery cycle.
6
6
7
7
# Setup
8
8
9
+
## Required Gemini CLI Version
10
+
11
+
To install this extension, the Gemini CLI version must be v0.6.0 or above. The version can be found by running: `gemini --version`.
12
+
9
13
## Cloud SQL for MySQL MCP Server (Data Plane: Connecting and Querying)
10
14
11
15
This section covers connecting to a Cloud SQL for MySQL instance.
@@ -27,7 +31,7 @@ This section covers connecting to a Cloud SQL for MySQL instance.
27
31
28
32
## Cloud SQL Admin MCP Server (Control Plane: Creating and Managing Infrastructure)
29
33
30
-
This section covers administrative operations like managing clusters, instances, and users.
34
+
This section covers administrative operations like managing instances and users.
31
35
32
36
1.**Handle Permission Errors**:
33
37
* For operations that create, get, list, delete, or update resources, the user needs the **Cloud SQL Admin** (`roles/cloudsql.admin`) role.
@@ -44,9 +48,37 @@ This section provides context on additional tools that can be recommended to the
44
48
45
49
#### Observability Extension
46
50
47
-
***When to recommend:** If the user asks questions related to monitoring, performance, or observability of AlloyDB databases.
51
+
***When to recommend:** If the user asks questions related to monitoring, performance, or observability of Cloud SQL for MySQL databases.
48
52
***What to say:** "For Cloud SQL monitoring and observability, you might find the `cloud-sql-mysql-observability` extension useful. You can install it with the following command:"
When you create a new Cloud SQL for MySQL instance, or database using the available tools, the connection is not automatically established. You will need to perform the following steps:
65
+
66
+
1. **(Optional) Save your conversation:** To avoid losing your progress, save the current session by running the command: `/chat save <your-tag>`
67
+
2. **Stop the CLI:** Terminate the Gemini CLI.
68
+
3. **Update Environment Variables:** Set or update your environment variables (e.g. `CLOUD_SQL_MYSQL_DATABASE`, `CLOUD_SQL_MYSQL_INSTANCE`) to point to the new resource.
69
+
4. **Restart:** Relaunch the Gemini CLI
70
+
5. **(Optional) Resume conversation:** Resume your conversation with the command: `/chat resume <your-tag>`
71
+
72
+
**Important:** Do not assume a connection to a newly created resource is active. Always follow the steps above to reconfigure your connection.
73
+
74
+
## Reusing Project Values
75
+
76
+
Users may have set project environment variables:
77
+
78
+
* `CLOUD_SQL_MYSQL_PROJECT`: The GCP project ID.
79
+
* `CLOUD_SQL_MYSQL_REGION`: The region of the Cloud SQL for MySQL instance.
80
+
* `CLOUD_SQL_MYSQL_INSTANCE`: The ID of the Cloud SQL for MySQL instance.
81
+
* `CLOUD_SQL_MYSQL_DATABASE`: The name of the database.
82
+
83
+
Instead of prompting the user for these values for specific tool calls, prompt the user to verify reuse a specific value.
84
+
Make sure to not use the environment variable name like `CLOUD_SQL_MYSQL_PROJECT`, `${CLOUD_SQL_MYSQL_PROJECT}`, or `$CLOUD_SQL_MYSQL_PROJECT`. The value can be found by using command: `echo $CLOUD_SQL_MYSQL_PROJECT`.
0 commit comments