Skip to content
Guide · Google Cloud

Cloud SQL for MySQL: Setup, Pricing & Best Practices

How to run MySQL on Google Cloud with Cloud SQL for MySQL: which MySQL versions and editions are available, the documented steps to create an instance and connect with the mysql client, the MySQL features and statements Cloud SQL blocks, replication and high availability, a worked comparison of Enterprise and Enterprise Plus costs, and practical advice, including the MySQL 8.0 extended support date in January 2027.

Facts checked 8 October 2026 against the providers' official documentation and pricing pages. Next review due January 2027. Cloud services, regions and prices change often; confirm on the provider's site before you buy.
Short answer
  • Cloud SQL for MySQL runs MySQL Community Edition 5.6, 5.7, 8.0, 8.4 (the default) and 9.7; MySQL 8.4 and 9.7 default to the Enterprise Plus edition.
  • MySQL 8.0 moves to paid extended support on 1 January 2027, so instances still on 8.0 should be upgraded to 8.4 or later.
  • Cloud SQL blocks a few MySQL features: LOAD DATA INFILE (the LOCAL form works), SELECT ... INTO OUTFILE, plugin installation, CREATE TABLE ... SELECT and the SUPER privilege on 5.6 and 5.7.
  • Replication is GTID-based and cannot be turned off; Cloud SQL can also replicate to external replicas and from an external MySQL server.
How we know: Research-based: versions, editions, setup steps, unsupported features, replication behaviour and prices were checked against the Cloud SQL for MySQL documentation and the Cloud SQL pricing page on cloud.google.com on 8 October 2026. We have not created a Cloud SQL for MySQL instance for this guide; setup steps summarise Google's quickstart, and cost figures are arithmetic on list prices.

Google Cloud MySQL: what Cloud SQL for MySQL is

If you search for Google Cloud MySQL or GCP MySQL, the managed answer is Cloud SQL for MySQL, the MySQL engine of Google Cloud SQL. Google describes it as fully managed MySQL Community Edition with backups, point-in-time recovery, automatic failover, private IP, import and export with mysqldump or CSV, read pools, storage shrink and vector embedding storage. Applications connect with the standard MySQL protocol and connectors, so existing code, ORMs and tools such as MySQL Workbench carry over.

For PHP and other web applications, Google lists PHP among the languages supported for App Engine applications that use Cloud SQL, alongside C#, Go, Java, Node.js, Python and Ruby; Cloud Run, Compute Engine and Google Kubernetes Engine can also connect. The alternative, MySQL self-installed on a Compute Engine VM, gives you full control but leaves backups, patching and failover to you.

Cloud SQL for MySQL versions (from Google's version policy page)
Major versionRegular support sinceExtended support startsDeprecation
MySQL 9.76 August 2026Not applicable yetNot applicable yet
MySQL 8.4 (default)1 October 2024Not applicable yetNot applicable yet
MySQL 8.030 August 20201 January 20271 July 2029
MySQL 5.71 August 20161 February 2025 (charged since 1 May 2025)1 February 2028
MySQL 5.61 August 20161 February 2025 (charged since 1 May 2025)1 February 2028

Create a Cloud SQL for MySQL instance and connect

Google's quickstart for Cloud SQL for MySQL follows the same pattern as the other engines. In the console, open the Cloud SQL Instances page, click Create instance, choose New instance, then Choose MySQL. Enter an instance ID and a password for the root user and create the instance. Before you click create, check the edition: because MySQL 8.4 defaults to Enterprise Plus, select Enterprise explicitly if you want the lower vCPU and memory rates and can accept maintenance restarts of up to 60 seconds.

To connect from your own machine over public IP, copy the connection name (projectID:region:instanceID), start the Cloud SQL Auth Proxy, and connect the mysql client to the local port. The quickstart commands (shell) are:

./cloud-sql-proxy INSTANCE_CONNECTION_NAME
mysql -u root -p --host 127.0.0.1 --port 3306

The proxy handles IAM authorisation and TLS encryption to the instance. For production workloads inside Google Cloud, Google recommends private IP with direct connections and SSL enforced. See MySQL GUI tools for desktop clients that can use the same local endpoint.

MySQL features Cloud SQL does not support

Google states that Cloud SQL for MySQL generally behaves like a locally hosted MySQL server, but as a managed service it restricts features that need advanced privileges. The main ones to check before migrating:

  • Statements that fail with Error 1290: The MySQL server is running with the Google option so it cannot execute this statement: LOAD DATA INFILE (use LOAD DATA LOCAL INFILE), SELECT ... INTO OUTFILE, SELECT ... INTO DUMPFILE, INSTALL PLUGIN, UNINSTALL PLUGIN and CREATE FUNCTION ... SONAME.
  • GTID restrictions: CREATE TABLE ... SELECT and transactions that update both transactional and non-transactional tables are not supported.
  • Engines and plugins: the Federated and Memory storage engines, the InnoDB memcached plugin, the X plugin, the Clone plugin and the validate_password component are unavailable.
  • Privileges: the SUPER privilege is not available on MySQL 5.6 and 5.7. On MySQL 8.0 and later, manage users with CREATE USER, GRANT and REVOKE rather than editing grant tables.

If you depend on exporting with INTO OUTFILE, switch to Cloud SQL export to Cloud Storage or to client-side tools such as mysqldump.

Replication, high availability and data cache

Cloud SQL for MySQL supports read replicas, cross-region and cascading replicas, external read replicas outside Cloud SQL, and Cloud SQL replicas fed from an external MySQL server, which is a common migration path. All replication is GTID-based, and Google notes you cannot disable it; the benefit is that replicas track their primary without binary log file names and positions.

High availability places a standby in a second zone with synchronous replication to disk. The standby cannot serve reads, which differs from the legacy Cloud SQL for MySQL HA configuration, so add read replicas if you need read scaling. On Enterprise Plus, the data cache extends the InnoDB buffer pool onto local SSD; Google recommends it for read-heavy workloads whose working set does not fit in memory and for instances with 16 or more vCPUs. It is enabled by default on Enterprise Plus and can be turned off.

Best practices for MySQL on GCP

  • Plan the 8.0 upgrade now. Extended support for MySQL 8.0 starts on 1 January 2027 and adds a per-vCPU charge. Cloud SQL supports in-place major version upgrades, but test application compatibility with 8.4 first.
  • Choose the edition deliberately. Enterprise Plus brings sub-second maintenance, data cache and 35-day point-in-time recovery; Enterprise costs less per vCPU and per GiB.
  • Use private IP for production and the Auth Proxy or a language connector for public IP access.
  • Keep instances on 8.0.35 or later if you are still on 8.0, because automatic minor version upgrades are supported only from that version.
  • Size replicas carefully; Google warns that undersized replicas are prone to out-of-memory events.
  • Watch storage growth; automatic increases are on by default and are permanent unless you shrink storage manually.

For broader engine choices, see MySQL vs PostgreSQL and AWS RDS vs Google Cloud SQL.

Pricing

Prices from the provider's official pricing pages, checked 8 October 2026, region Iowa (us-central1), in USD, excluding tax. List prices only; discounts, commitments and your actual usage change the bill.

Google Cloud MySQL pricing is the general Cloud SQL rate card. On demand, the Enterprise edition (general purpose and N4 machines) charges 0.0413 USD per vCPU-hour and 0.007 USD per GiB-hour of memory; Enterprise Plus on N2 charges 0.0537 USD per vCPU-hour and 0.0091 USD per GiB-hour, plus data cache storage at 0.000219178 USD per GiB-hour. Single-zone SSD storage is 0.000232877 USD per GiB-hour for both. Extended support for end-of-life versions adds 0.07 USD per vCPU-hour in years one and two. The examples compare the two editions for the same machine size, because MySQL 8.4 defaults to Enterprise Plus.

Enterprise edition, N4 machine, single zone

  • MySQL 8.4 on an assumed 4 vCPU, 32 GiB N4 machine (N4 uses a 1:8 core-to-memory ratio)
  • 100 GiB SSD storage, 730 hours, on-demand rates
  • Excludes backups, egress, idle IP charges and tax
ItemBasisEstimated per month
vCPUs4 vCPUs x 730 hours x 0.0413 USD120.60 USD
Memory32 GiB x 730 hours x 0.007 USD163.52 USD
SSD storage100 GiB x 730 hours x 0.000232877 USD17.00 USD
Estimated totalAbout 301.12 USD per month

Enterprise Plus edition, N2 machine, single zone

  • Same 4 vCPU, 32 GiB sizing on the N2 series, single zone
  • 100 GiB SSD storage, 730 hours, on-demand rates
  • Excludes data cache storage (size depends on the machine), backups, egress and tax
ItemBasisEstimated per month
vCPUs4 vCPUs x 730 hours x 0.0537 USD156.80 USD
Memory32 GiB x 730 hours x 0.0091 USD212.58 USD
SSD storage100 GiB x 730 hours x 0.000232877 USD17.00 USD
Estimated totalAbout 386.38 USD per month before data cache (about 85.26 USD more than Enterprise)

Worked examples are estimates calculated from the list prices above; they are not quotes or measured bills.

Frequently asked questions

What MySQL versions does Cloud SQL support?

MySQL 5.6, 5.7, 8.0, 8.4 and 9.7, with 8.4 as the default. Versions 5.6 and 5.7 are in paid extended support, and 8.0 joins them on 1 January 2027. Enterprise Plus supports 8.0, 8.4 and 9.7.

How much does Google Cloud MySQL cost?

It is billed per vCPU, per GiB of memory and per GiB of provisioned storage, with higher rates for Enterprise Plus and for high availability. The pricing section compares a four-vCPU instance on both editions using Iowa list prices; the Cloud SQL pricing guide covers HA, CUDs and egress.

Why does LOAD DATA INFILE fail on Cloud SQL?

Cloud SQL blocks server-side file access, so LOAD DATA INFILE returns error 1290. Use LOAD DATA LOCAL INFILE from the client, or import a CSV file through Cloud SQL import.

Can I host a PHP and MySQL site on Google Cloud?

Yes. Cloud SQL for MySQL works with PHP applications on App Engine, Cloud Run, Compute Engine or Google Kubernetes Engine, using standard MySQL drivers. Use private IP or the Auth Proxy rather than opening the database to the internet.

Can I replicate from my own MySQL server into Cloud SQL?

Yes. Cloud SQL supports replicating from an external server into Cloud SQL replicas, and Database Migration Service offers continuous replication for migrations. Cloud SQL does not support replication between two external servers.

Sources

Checked 8 October 2026.

How we research cloud database guides: our editorial method. CodeWithSQL earns nothing from the providers mentioned.

Choosing where to run your database?

Start with the section overview, or compare providers side by side.