Cloud SQL for MySQL
- Fully managed MySQL Community Edition databases in the cloud.
- Second Generation instances support MySQL 5.6 or 5.7, and provide up to 416 GB of RAM and 30 TB of 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 of data storage.
- Create and manage instances in the Google Cloud Console.
- Instances available in US, EU, Asia or Australia.
- 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 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 and on-demand backups, and point-in-time recovery.
- Instance cloning.
- Integration with Stackdriver logging and monitoring.
- ISO/IEC 27001 compliant.
You can use 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 Cloud SQL instance for MySQL from:
mysqlclient. Learn more.
- Third-party tools like SQL Workbench or Toad for MySQL. Learn more.
- External applications. Learn more.
- App Engine applications. Learn more.
- Applications running on Compute Engine. Learn more.
- Applications running on Google Kubernetes Engine. Learn more.
- Cloud Functions. Learn more.
- Cloud Run. Learn more.
- Google Apps Script scripts Learn more.
Connecting to Cloud SQL by using Private Google access is not supported. Private services access is supported. For more information, see Private Access Options for Services.
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.
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
LOAD DATA LOCAL
SELECT ... INTO OUTFILE
SELECT ... INTO DUMPFILE
INSTALL 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 ... SELECTstatements
CREATE TEMPORARY TABLEstatements inside transactions
- Transactions or statements that update both transactional and nontransactional tables
For more information, see the MySQL documentation.
Unsupported client program features
If you want to import databases with binary data into your Cloud SQL for MySQL instance, you must use the
hex-blobis not a required flag when you are using a local MySQL server instance and the
mysqlclient, 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.
To request the addition of a configurable Cloud SQL flag, use 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.
This flag impacts how hostnames are resolved for client connections. Learn more.