MySQL features by Cloud SQL editions
For more information about the features for each edition of Cloud SQL for MySQL, see Introduction to Cloud SQL editions.
MySQL general feature support for Cloud SQL
- Fully managed MySQL Community Edition databases in the cloud.
- Instances available in the Americas, EU, Asia, and Australia. See all locations where you can create Cloud SQL instances.
- Supports migration from source databases to Cloud SQL destination databases using Database Migration Service (DMS).
- 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 Auth Proxy or with the SSL/TLS protocol.
- Support for private IP (private services access).
- 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 backups, on-demand backups, and point-in-time recovery.
- Instance cloning.
- Integration with Google Cloud Observability logging and monitoring.
- ISO/IEC 27001 compliant.
Supported languages for Cloud SQL for MySQL
You can use Cloud SQL with App Engine applications running in the flexible environment that are written in:
- C#
- Go
- Java
- Node.js
- PHP
- Python
- Ruby
You can also use Cloud SQL with external applications using the standard MySQL protocol.
How you can connect to Cloud SQL for MySQL instances
You can connect to a Cloud SQL instance from the following:
- A
mysql
client. - Third-party tools like SQL Workbench or Toad for MySQL.
- External applications.
- App Engine applications.
- Applications running on Compute Engine.
- Applications running on Google Kubernetes Engine.
- Cloud Run functions.
- Cloud Run.
- Google Apps Script scripts.
Connecting to Cloud SQL with Private Google Access isn't supported. Private services access is supported. For more information, see Private Access Options for Services.
User management in Cloud SQL for MySQL 8.0
Due to changes in MySQL 8.0, you can't use CREATE
or DELETE
statements for
MySQL user management. You also can't modify user privileges using INSERT
,
UPDATE
, or DELETE
statements. Instead, use CREATE
, DROP USER
, GRANT
,
and REVOKE
statements to modify user privileges. For more information, see
Account management
notes.
Note: Disregard information under Account management notes about running
mysql_upgrade
to upgrade to version 8.0. Instead, upgrade using the procedure
in Upgrading MySQL on an
instance.
Differences between standard MySQL functionality and Cloud SQL for MySQL
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 instance.
Unsupported MySQL features for Cloud SQL
The following feature is unsupported for Cloud SQL for MySQL 5.6 and 5.7:
The following features are unsupported for Cloud SQL for MySQL 8.0:
Unsupported MySQL plugins for Cloud SQL
- InnoDB memcached plugin
- X plugin
- Clone plugin
- InnoDB data-at-rest encryption
- validate_password component
Unsupported MySQL statements for Cloud SQL
The following SQL statements generate an error with the Error 1290:
The MySQL server is running with the Google option so it cannot execute this
statement
message:
LOAD DATA INFILE
SELECT ... INTO OUTFILE
SELECT ... INTO DUMPFILE
INSTALL PLUGIN ...
UNINSTALL PLUGIN
CREATE FUNCTION ... SONAME ...
The following statements aren't supported because MySQL instances use GTID replication:
CREATE TABLE ... SELECT
statements- Transactions or statements that update both transactional and nontransactional tables
The following MySQL statement is unsupported for Cloud SQL for MySQL 5.6 and 5.7, but is supported for Cloud SQL for MySQL 8.0:
CREATE TEMPORARY TABLE
statements inside transactions
For more information, see the MySQL documentation .
Unsupported MySQL functions for Cloud SQL
LOAD_FILE()
Unsupported MySQL client program features for Cloud SQL
mysqldump
using the--tab
option or options that are used with--tab
. This is because the FILE privilege isn't granted for instance users. All othermysqldump
options are supported. For information on usingmysqldump
options that optimize your file for importing into Cloud SQL, see Export from your local MySQL server using mysqldump.mysqlimport
without using the--local
option. This is because of theLOAD DATA INFILE
restriction. To import data into your Cloud SQL instance, see importing using a dump file or importing using a CSV file.If you want to import databases with binary data into your Cloud SQL instance, you must use the
--hex-blob
option withmysqldump
.Although
hex-blob
isn't a required flag when you're using a local MySQL server instance and themysql
client, it's required if you want to import any databases with binary data into your Cloud SQL instance. To import data into your Cloud SQL instance, see importing using a dump file or importing using a CSV file.Not all MySQL options and parameters are enabled for editing as Cloud SQL flags.
To request the addition of a configurable Cloud SQL flag, use the Cloud SQL Discussion group.
InnoDB is the only supported storage engine. For help with converting tables from MyISAM to InnoDB, see Converting table to InnoDB in the MySQL documentation.
MySQL options preset for Cloud SQL
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. See
skip-name-resolve
in the MySQL documentation.
log_bin
This flag reports whether binary logging is enabled. If the --log-bin
option
is used, then the value of this variable is ON
; otherwise it's OFF
. See
log_bin
in the MySQL documentation.
MySQL 8.0 authentication for Cloud SQL
Cloud SQL for MySQL 8.0 uses mysql_native_password
as the default
authentication plugin for new users instead of caching_sha2_password
. The
mysql_native_password
plugin is the default for MySQL 5.6 and 5.7 users.
If you want new users to use the
caching_sha2_password
plugin as the default authentication, you can configure your instance flag for
default_authentication_plugin
to use caching_sha2_password
.
To configure existing users to use caching_sha2_password
, use the ALTER USER
command to change the authentication plugin.
Users that have caching_sha2_password
authentication might need to use
the get-server-public-key
flag when connecting. For details, see
Using SHA-2 Pluggable Authentication in the MySQL documentation.
Changes to MySQL system flags in Cloud SQL
For some MySQL system flags, Cloud SQL uses values that differ from the default values. You can't change the values for these flags. For a list of flags, see MySQL system flags changed in Cloud SQL.
Unsupported Cloud SQL features in Cloud SQL for MySQL 8.0
Cloud SQL for MySQL 8.0 doesn't support the legacy version of MySQL high availability (HA) configuration that uses failover replicas. It supports the new regional HA configuration.