Cloud SQL Features

This page describes the major features and capabilities of Google Cloud SQL. Cloud SQL is available for MySQL and PostgreSQL.

Cloud SQL for MySQL

Features

  • Fully managed MySQL Community Edition databases in the cloud.
  • Second Generation instances support MySQL 5.6 or 5.7, and provide up to 208 GB of RAM and 10 TB data storage, with the option to automatically increase the storage size as needed.
  • First Generation instances support MySQL 5.5 or 5.6, and provide up to 16 GB of RAM and 500 GB data storage.
  • Create and manage instances in the Google Cloud Platform Console.
  • Instances available in US, EU, or Asia.
  • Customer data encrypted on Google’s internal networks and in database tables, temporary files, and backups.
  • Support for secure external connections with the Cloud SQL Proxy or with the Secure Sockets Layer (SSL) protocol.
  • Data replication between multiple zones with automatic failover.
  • Import and export databases using mysqldump, or import and export CSV files.
  • Support for MySQL wire protocol and standard MySQL connectors.
  • Automated and on-demand backups, and point-in-time recovery.
  • Instance cloning.
  • Integration with Stackdriver logging and monitoring.
  • ISO/IEC 27001 compliant.

Supported languages

You can use Google Cloud SQL for MySQL with App Engine applications that are written in Java, Python, PHP, Node.js, Go, and Ruby. You can also use Cloud SQL for MySQL with external applications using the standard MySQL protocol.

How you can connect to Cloud SQL for MySQL instances

You can connect to a Google Cloud SQL instance for MySQL from:

Connecting from Google Cloud Functions or by using Private Google access is not supported.

Differences between Cloud SQL and standard MySQL functionality

In general, the MySQL functionality provided by a Cloud SQL instance is the same as the functionality provided by a locally-hosted MySQL instance. However, there are a few differences between a standard MySQL instance and a Cloud SQL for MySQL instance.

Unsupported features

Unsupported statements

Sending any of the following types of SQL statements will generate an error with the message "Error 1290: The MySQL server is running with the google option so it cannot execute this statement":

  • LOAD DATA INFILE

    Note that LOAD DATA LOCALINFILE is supported.

  • SELECT ... INTO OUTFILE

  • SELECT ... INTO DUMPFILE
  • INSTALL PLUGIN ...
  • UNINSTALL PLUGIN
  • CREATE FUNCTION ... SONAME ...

Unsupported statements for Second Generation instances

The following statements are not supported because Second Generation instances use GTID replication:

  • CREATE TABLE ... SELECT statements
  • CREATE TEMPORARY TABLE statements inside transactions
  • Transactions or statements that update both transactional and nontransactional tables

For more information, see the MySQL documentation.

Unsupported functions

  • LOAD_FILE()

Unsupported client program features

  • mysqlimport without using the --local option. This is because of the LOAD DATA INFILE restriction. If you need to load data remotely, use the Cloud SQL import function.

  • mysqldump using the --tab option or options that are used with --tab. This is because the FILE privilege is not granted for instance users. All other mysqldump options are supported.

  • If you want to import databases with binary data into your Cloud SQL for MySQL instance, you must use the --hex-blob option with mysqldump.

    Although hex-blob is not a required flag when you are using a local MySQL server instance and the mysql client, it is required if you want to import any databases with binary data into your Cloud SQL instance. For more information about importing data, see Importing Data.

  • Not all MySQL options and parameters are enabled for editing as Cloud SQL flags.

    If you need to update a flag that is not enabled for editing, start a thread on the Cloud SQL Discussion group.

  • For Second Generation instances, InnoDB is the only supported storage engine. For help with converting tables from MyISAM to InnoDB, see the MySQL documentation.

Notable MySQL options

Cloud SQL runs MySQL with a specific set of options. If an option might impact how your applications work, we note it here for your information.

skip-name-resolve

This flag impacts how hostnames are resolved for client connections. Learn more.

Cloud SQL for PostgreSQL

Features

  • Fully managed PostgreSQL 9.6 databases in the cloud.
  • Custom machine types with up to 208 GB of RAM and 32 CPUs.
  • Up to 10TB of storage available, with the ability to automatically increase storage size as needed.
  • Create and manage instances in the Google Cloud Platform Console.
  • Instances available in US, EU, or Asia.
  • Customer data encrypted on Google’s internal networks and in database tables, temporary files, and backups.
  • Support for secure external connections with the Cloud SQL Proxy or with the Secure Sockets Layer (SSL) protocol.
  • Import and export databases using SQL dump files.
  • Support for PostgreSQL client-server protocol and standard PostgreSQL connectors.
  • Automated and on-demand backups.
  • Integration with Stackdriver logging and monitoring.

Features not available for Beta

Because Cloud SQL for PostgreSQL is in Beta, some PostgreSQL features are not yet available:

  • Replication
  • High-availability configuration
  • Point-in-time recovery (PITR)
  • Import/export in CSV format

Supported extensions

Cloud SQL for PostgreSQL supports many PostgreSQL extensions. For a complete list, see PostgreSQL Extensions.

Supported procedural languages

Cloud SQL for PostgreSQL supports the PL/pgSQL SQL procedural language.

Supported languages

You can use Google Cloud SQL for PostgreSQL with App Engine applications running in the flexible environment that are written in Java, Python, PHP, Node.js, Go, and Ruby. You can also use Cloud SQL for PostgreSQL with external applications using the standard PostgreSQL client-server protocol.

How you can connect to Cloud SQL for PostgreSQL instances

You can connect to a Google Cloud SQL instance for PostgreSQL from:

  • A psql client Learn more.
  • Third-party tools that use the standard PostgreSQL client-server protocol.
  • External applications Learn more.
  • Google App Engine applications Learn more.
  • Applications running on Google Compute Engine Learn more.
  • Applications running on Google Container Engine Learn more.

Connecting from Google Cloud Functions or by using Private Google access is not supported.

Differences between Cloud SQL and standard PostgreSQL functionality

In general, the PostgreSQL functionality provided by a Cloud SQL instance is the same as the functionality provided by a locally-hosted PostgreSQL instance. However, there are a few differences between a standard PostgreSQL instance and a Cloud SQL for PostgreSQL instance.

Unsupported features

  • Any features that require SUPERUSER privileges

    An exception to this rule is made for the CREATE EXTENSION statement, but only for supported extensions.

  • Custom background workers

  • The psql client in the Cloud Shell does not support operations that require a reconnection, such as connecting to a different database using the \c command.

Notable differences

  • There are a number of PostgreSQL options and parameters that are not enabled for editing as Cloud SQL flags.

    If you need to update a flag that is not enabled for editing, start a thread on the Cloud SQL Discussion group.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Cloud SQL Documentation