Manage your data using Cloud SQL Studio Stay organized with collections Save and categorize content based on your preferences.
This page describes how to explore and manage your Cloud SQL data usingCloud SQL Studio in the Google Cloud console.
Cloud SQL Studio lets authorized users interact directly with the SQL databaseand run SQL queries from the Google Cloud console to access and manipulate data.You can perform a range of actions thatyou would perform on a SQL command line client,such as creating tables and indexes, modifying tables, or setting up views.
Cloud SQL Studio includes anExplorer pane that integrates with a queryeditor and a SQL query results table. You can run DDL, DML, and DQL statementsfrom this one interface. For example, instead of configuring a third-partydatabase query tool, you can create a table and query your data using the queryeditor in Cloud SQL Studio.
You can use theExplorer pane to view and interact with your database objects.You create, alter, and delete the database objects, such as the following:
- Tables
- Columns
- Indexes and keys
- Functions
You can also use theExplorer pane to seedSELECT queries for tables.
Cloud SQL Studio automatically validates the syntax when you type a query orselect part of a query.
Note: System-level views in theINFORMATION_SCHEMA schema is read-only.If you're new to Cloud SQL, seeCloud SQL overview.
Required roles and permissions
To get the permissions that you need to complete the tasks in this document, ask your administrator to grant you theCloud SQL Studio User (roles/cloudsql.studioUser) IAM role on the project. For more information about granting roles, seeManage access to projects, folders, and organizations.
You might also be able to get the required permissions throughcustom roles or otherpredefined roles.
To use Cloud SQL Studio, you must have the following permissions:
cloudsql.databases.listcloudsql.instances.executeSqlcloudsql.instances.getcloudsql.instances.login(only required if you're using IAM database authentication)cloudsql.users.list
Additionally, ensure that you have database-level permissions for the databasethat you're using for authentication, and the password for the privilegeddatabase user that you're using.
Authenticate to Cloud SQL Studio
Before you can access a database in Cloud SQL Studio,you must first select a database authentication method. To sign in to yourdatabase using Cloud SQL Studio, you can use one of the following types of authentication:
IAM database authentication. Using this type of authentication lets you sign in to your database and Cloud SQL Studio without having to manage an extra password. You can also take advantage ofIAM group authentication and manage the database access and privileges for multiple users in your organization at the same time.
Built-in database authentication. You connect to the database in Cloud SQL Studio by using your MySQL user account and credentials.
Explore your data
To access theExplorer pane, follow these steps:
In the Google Cloud console, go to theCloud SQL Instances page.
- Select an instance from the list.
- In the navigation menu, clickCloud SQL Studio.
- Sign in to Cloud SQL Studio using the name of your database, username,and password. TheExplorer pane displays a list of the objects in yourdatabase.
Create, modify, and query your data
Using the SQL editor, you can run a combination of DDL, DML, and DQL statements.You can compose a query yourself, or you can populate the query editor with atemplate using the explorer.
To structure, modify, or query your data, follow these steps:
In the Google Cloud console, go to theCloud SQL Instances page.
- Select an instance from the list.
- In the navigation menu, clickCloud SQL Studio.
- Sign in to Cloud SQL Studio using the name of your database, username, and password.
- Compose a query using one of the following methods:
- To compose your own query, follow these steps:
- Open a new tab by clicking.
- When the query editor appears, write your query.
- To compose a query starting with a template, follow these steps:
- In theExplorer pane, next to a database object or collection,clickmore_vertView actions. One or more available actions appear.
- Click an action. The query editor populates with a template.
- Replace any placeholders in the template.
- To compose your own query, follow these steps:
Run your queries using either of the following approaches:
- To execute all the statements in the query editor, clickRun.
- To run specific statements, select one or multiple statements, and clickRun selected.
The results of your queries appear in theResults tab. If multiple resultsets are available, select a result from theAll results drop-down list.
Limitations
- Cloud SQL Studio supports lightweight queries. If the SQL response isover 10MB, then the response will be truncated. Cloud SQL Studioindicates when partial results are returned.
- You can only run queries for Cloud SQL instances that are running.
- Cloud SQL Studio doesn't support external servers.
- Requests taking longer than five minutes are canceled. Setting a higherquery timeout using
SET SESSION MAX_EXECUTION_TIMEisn't supported. ForCloud SQL for MySQL 5.6 and 5.7, long running DDL statements timing outmay cause orphaned files or tables that can't be safely rolled back. Becautious with queries likeALTER TABLEon large tables. - Cloud SQL Studio doesn't keep a database connection open after executionof a SQL script is completed. Similarly, editor tabs don't share a commonsession and every execution starts a new session.
- When you run a mix of DML, DQL, and DDL statements, only results from theDQL queries will be displayed.
- Closing your browser or browser tab doesn't stop the query execution inCloud SQL Studio. The query will run until it completes or times out.
- Cloud SQL Studio doesn't support running
SELECTqueries onBLOBdata.If the SQL script produces aBLOBcolumn in the output, then the SQL scriptfails with an error. - Cloud SQL for MySQL client commandsaren't supported and can't be executed in Cloud SQL Studio.
- The
rootuser is not supported in Cloud SQL Studio. - Cloud SQL Studio always requires a database even if Cloud SQL for MySQL doesn'trequire a database to connect.
- Users with empty passwords are not supported in Cloud SQL Studio.
USE databaseis stateful only for the active query execution and doesn'tfunction the same as in thegcloud CLI.- The database user must have the permission to connect from the localhost.
When running multiple queries and one of them fails, the first encounterederror is returned. Some of the statements in the batch prior to the errormight have executed successfully. You can wrap multiple queries in a
transactionstatement to prevent this issue:STARTTRANSACTION;YOUR_SQL_STATEMENTSCOMMIT;Replace the following:
- YOUR_SQL_STATEMENTS: the statements you want to runas part of this query
As part of the automatic syntax validation, Cloud SQL Studio validatesyour queries in real time from the MySQL instance.If you'veenabled audit logging orMySQL general logging, then the validation sessions are logged like any other session. To avoid logging of suchvalidation sessions, you can set the
cloudsql_avoid_parse_session_loggingflag toon. The default isoff.Cloud SQL doesn't validate the SQL statement part of aprepared statement (
preparable_stmt).
What's next
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.