Users

The Users resource represents a MySQL user in a Cloud SQL instance. You can use the Users resource to manage MySQL users without having to connect to a Cloud SQL instance with a tool like MySQL client. For more information, see Creating and Managing MySQL Users.

When you manage MySQL users with the Users resource, you access the Cloud SQL instance, which may result in extra charges depending on the activation policy and billing plan selected for the instance. For more information, see the FAQ How is use of my instance calculated?

For a list of methods for this resource, see the end of this page.

Resource representations

A User resource.

{
  "kind": "sql#user",
  "name": string,
  "etag": etag,
  "host": string,
  "project": string,
  "instance": string,
  "password": string
}
Property name Value Description Notes
etag etag HTTP 1.1 Entity tag for the resource.
host string The host name from which the user can connect. For insert operations, host defaults to an empty string. For update operations, host is specified as part of the request URL. The host name cannot be updated after insertion. writable
instance string The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for update since it is already specified on the URL.
kind string This is always sql#user.
name string The name of the user in the Cloud SQL instance. Can be omitted for update since it is already specified on the URL.
password string The password for the user. writable
project string The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. Can be omitted for update since it is already specified on the URL.

Methods

delete
Deletes a user from a Cloud SQL instance.
insert
Creates a new user in a Cloud SQL instance.
list
Lists users in the specified Cloud SQL instance.
update
Updates an existing user in a Cloud SQL instance.

Send feedback about...

Cloud SQL Documentation