Cloud SQL

Cloud SQL for MySQL

Highly performant, fully managed MySQL database service

Fully managed MySQL database for demanding enterprise workloads. Offers a 99.99% availability SLA and category-leading performance with Cloud SQL Enterprise Plus Edition.

New customers get $300 in free credits to try Cloud SQL for MySQL and other Google Cloud products.

Looking for information on all versions of MySQL supported by Cloud SQL? Click here

Features

High performance

Cloud SQL for MySQL uses built-in software optimizations and hardware stack featuring an optional data cache option to boost performance, delivering up to 3x higher read throughput and up to 2x improvement in write latency compared to Enterprise Edition. When compared to Amazon’s comparable MySQL service, Cloud SQL for MySQL delivers up to 3x higher performance.

Fully managed

Cloud SQL for MySQL manages your MySQL databases so you don't have to, enabling your business to run without disruption. Cloud SQL automates all your backups, replication, patches, encryption, and storage capacity increases to give your applications the reliability, scalability, and security they need.

Vector search

Vector search is a critical capability for building useful and accurate gen AI-powered apps. Cloud SQL for MySQL supports two search approaches for balancing speed and accuracy. Approximate nearest neighbor (ANN) vector search is ideal for large datasets where close matches suffice, while exact nearest neighbor (KNN) vector search is typically used for high precision on smaller datasets. Integrate vector search directly into your existing AI-powered apps without needing to learn and manage a separate system.

Secure and trusted

Your data is secured with automatic encryption at rest and in transit, with integrated support for customer-managed encryption keys, Cloud IAM database authentication, Virtual Private Cloud (VPC), and user-controlled network access with firewall protection to control public network access. Cloud SQL also supports Private Service Connect, which allows you to access your database instances via private IP without going through the internet or using external IP addresses.

Gemini in databases

Simplify all aspects of the database journey with AI-powered assistance, helping you focus on what matters most. Gemini in Cloud SQL, in Preview, simplifies all aspects of database operations including migration, development, performance optimization, governance, and fleet management with a single pane of glass. It offers insights into database performance, security, reliability, and cost to help you quickly understand and resolve issues of all types.

MySQL compatible

Continue to leverage the MySQL ecosystem and  administration tools, such as MySQL Workbench, mysqldump, phpMyAdmin, dbForge Studio, Toad Edge for MySQL, and the MySQL CLI, which is integrated in our Cloud SDK. Experience full support for all current versions of MySQL, and get access to nearly 200 flags to optimize your environment. Get started fast with easy, serverless migrations using Database Migration Service.

Highly available with 99.99% SLA

Easily configure built-in high availability with automatic failover across zones to protect your applications from a variety of possible failures. Automated backups and point-in-time recovery guard against user error. Use cross-region replicas and global VPCs to simplify protecting your data in the event of a disaster. Cloud SQL for MySQL offers up to 99.99% availability SLA for the most demanding workloads featuring maintenance and instance scale-up with typically sub-second downtime.

Fast, easy, and secure migrations

Database Migration Service makes it easy to migrate databases from on-premises, Compute Engine, and other clouds to Cloud SQL for MySQL with minimal downtime. DMS leverages the native replication capabilities of the source database to maximize the reliability of your migration. Lift and shift migrations to Cloud SQL are available at no additional charge.

Data protection with backups and point-in-time-recovery

Automate daily backups and binary logging to restore your instance to its state at an earlier point in time with a retention period of up to 35 days.

Compliance

Configure where your data is stored to comply with data residency requirements. Cloud SQL automatically encrypts data, is SSAE 16, ISO 27001, and PCI DSS compliant, and supports HIPAA compliance.

Easy integrations

Access Cloud SQL for MySQL instances from just about any application. Seamlessly connect from Compute Engine, Cloud Run, Google Kubernetes Engine, and your workstation. Provision your database via APIs and third-party tools, and use federated queries from BigQuery and low-latency database replication with Datastream for near real-time insights on operational data.

Scalability

Easily scale up as your data grows—add up to 128 processor cores, 864 GB of RAM, and 70 TB of storage. Add read replicas, cross-region read replicas, cascading read replicas, and external read replicas to handle increasing read traffic. Automatic storage increases eliminate the need to estimate future storage needs or spend money on capacity before you need it.

Maintenance

Fast, automated maintenance keeps your instances patched and stable. Cloud SQL for MySQL offers sub-second downtime for planned maintenance, and all availability SLAs (up to 99.99%) are inclusive of maintenance. Receive notifications up to 5 weeks in advance so that you can plan around maintenance better and apply controls, such as a week-long postponement or a deny period of up to 90 days.

LangChain integration

Easily build gen AI applications that are accurate, transparent, and reliable with LangChain integration. Cloud SQL has three LangChain integrations: Document loader for loading and storing information from documents, Vector stores for enabling semantic search, and Chat Messages Memory for enabling chains to recall previous conversations. Visit the GitHub repository to learn more.

Data cache

The data cache leverages flash memory on your MySQL database instances to lower read latency and improve throughput by intelligently caching data across memory and high speed local storage.

Cloud SQL for MySQL editions

FeaturesEnterpriseEnterprise Plus

Machine type

General purpose machine family

Performance optimized N family

Machine configuration

Up to 96 vCPU

Up to 624 GB RAM

1:6.5 core:memory ratio

Up to 128 vCPU

Up to 864 GB RAM

1:8 core:memory ratio

Versions supported

MySQL 5.6, 5.7, 8.0

MySQL 8.0

Availability SLA

99.95%

99.99%

Maintenance downtime

< 60 seconds

< 1 second

Data cache

No

Yes

PITR retention

Up to 7 days

Up to 35 days

For more information click here.

Machine type

Enterprise

General purpose machine family

Enterprise Plus

Performance optimized N family

Machine configuration

Enterprise

Up to 96 vCPU

Up to 624 GB RAM

1:6.5 core:memory ratio

Enterprise Plus

Up to 128 vCPU

Up to 864 GB RAM

1:8 core:memory ratio

Versions supported

Enterprise

MySQL 5.6, 5.7, 8.0

Enterprise Plus

MySQL 8.0

Availability SLA

Enterprise

99.95%

Enterprise Plus

99.99%

Maintenance downtime

Enterprise

< 60 seconds

Enterprise Plus

< 1 second

Data cache

Enterprise

No

Enterprise Plus

Yes

PITR retention

Enterprise

Up to 7 days

Enterprise Plus

Up to 35 days

For more information click here.

How It Works

Create a new database from the console or use Database Migration Service to migrate an existing database. Manage your database via the console, CLI, or REST API to scale up in minutes, to replicate data across zones and regions, and for maintenance, logging, monitoring, and configuration.

Cloud SQL in a minute
Cloud SQL in a minute

Common Uses

ecommerce

Build ecommerce applications

Cloud SQL for MySQL is great at managing structured data like product catalogs, customer information, orders, and inventory levels. Cloud SQL's ability to handle high volumes of transactions and concurrent users ensures optimal shopping experience even during peak traffic times, while its strong security features protect sensitive customer data, making it a great choice for ecommerce applications.

Deploy an ecommerce web application
E-commerce application architecture

    Build ecommerce applications

    Cloud SQL for MySQL is great at managing structured data like product catalogs, customer information, orders, and inventory levels. Cloud SQL's ability to handle high volumes of transactions and concurrent users ensures optimal shopping experience even during peak traffic times, while its strong security features protect sensitive customer data, making it a great choice for ecommerce applications.

    Deploy an ecommerce web application
    E-commerce application architecture

      Content management systems (CMS)

      Build CMS websites

      MySQL is the backbone of many CMS platforms like WordPress, Drupal, and Joomla. Its ability to efficiently store and retrieve articles, blog posts, images, user comments, and website settings make it ideal for this use case. MySQL's relational structure makes it easy to link articles to categories, tags, and authors, enabling complex content organization. Furthermore, Cloud SQL’s scalability ensures that websites remain responsive as the content grows.

      Deploy WordPress on GKE and Cloud SQL

        Build CMS websites

        MySQL is the backbone of many CMS platforms like WordPress, Drupal, and Joomla. Its ability to efficiently store and retrieve articles, blog posts, images, user comments, and website settings make it ideal for this use case. MySQL's relational structure makes it easy to link articles to categories, tags, and authors, enabling complex content organization. Furthermore, Cloud SQL’s scalability ensures that websites remain responsive as the content grows.

        Deploy WordPress on GKE and Cloud SQL

          Games

          Mobile game backends

          MySQL is a well known relational database used when building online game backends. It can store game world state and essential persistence data. For small- to medium-sized, asynchronous, turn-based mobile games, a database such as Cloud SQL for MySQL can be an excellent choice as it is fully managed MySQL with solid performance, minimal operations, and automated backups.

          Using Cloud SQL as mobile game backend
          Gaming Architecture using Cloud SQL for MySQL

            Mobile game backends

            MySQL is a well known relational database used when building online game backends. It can store game world state and essential persistence data. For small- to medium-sized, asynchronous, turn-based mobile games, a database such as Cloud SQL for MySQL can be an excellent choice as it is fully managed MySQL with solid performance, minimal operations, and automated backups.

            Using Cloud SQL as mobile game backend
            Gaming Architecture using Cloud SQL for MySQL

              Generative AI

              Build generative AI applications

              MySQL plays a crucial role in developing and deploying generative AI applications with its support of storage and similarity search for vector embeddings. Cloud SQL for MySQL provides K-nearest-neighbor (KNN) and approximate-nearest-neighbor (ANN) search between embeddings. Furthermore Cloud SQL’s integration with LangChain makes it a great choice for generative AI application development.

              Build LLM-powered applications
              Vector Search Demo

                Build generative AI applications

                MySQL plays a crucial role in developing and deploying generative AI applications with its support of storage and similarity search for vector embeddings. Cloud SQL for MySQL provides K-nearest-neighbor (KNN) and approximate-nearest-neighbor (ANN) search between embeddings. Furthermore Cloud SQL’s integration with LangChain makes it a great choice for generative AI application development.

                Build LLM-powered applications
                Vector Search Demo

                  Pricing

                  How Cloud SQL pricing worksPricing varies with editions, engine, and settings, including how much storage, memory, and CPU you provision. Cloud SQL offers per-second billing.
                  ServiceDescriptionPrice

                  Compute

                  Cloud SQL Enterprise

                  Best for general purpose workloads. It offers:

                  1-96 vCPUs

                  1:6.5 core memory ratio

                  99.95% SLA

                  < 60s of planned downtime

                  Starting at

                  $0.0413

                  per vCPU/hour

                  Cloud SQL Enterprise Plus

                  Best for high performance workloads. It offers:

                  Up to 128 vCPUs

                  1:8 core memory ratio

                  99.99% SLA

                  Starting at

                  $0.05369

                  per vCPU/hour

                  Memory

                  Cloud SQL Enterprise

                  up to 624 GB

                  Starting at

                  $0.007

                  per GB/hour

                  Cloud SQL Enterprise Plus

                  up to 824 GB

                  Starting at

                  $0.0091

                  per GB/hour

                  Storage - SSD

                  Storage and networking prices depend on the region where the instance is located; Cloud SQL Enterprise pricing and Cloud SQL Enterprise Plus pricing are the same

                  $0.17

                  per GB/month

                  Storage - Local SSD

                  This is only available for Cloud SQL Enterprise Plus

                  $0.16

                  per GB/month

                  PITR Logs on Google Cloud Storage

                  Cloud SQL Enterprise

                  Up to 7 days

                  Free

                  Cloud SQL Enterprise Plus

                  Up to 35 days

                  Free

                  How Cloud SQL pricing works

                  Pricing varies with editions, engine, and settings, including how much storage, memory, and CPU you provision. Cloud SQL offers per-second billing.

                  Compute

                  Description

                  Cloud SQL Enterprise

                  Best for general purpose workloads. It offers:

                  1-96 vCPUs

                  1:6.5 core memory ratio

                  99.95% SLA

                  < 60s of planned downtime

                  Price

                  Starting at

                  $0.0413

                  per vCPU/hour

                  Cloud SQL Enterprise Plus

                  Best for high performance workloads. It offers:

                  Up to 128 vCPUs

                  1:8 core memory ratio

                  99.99% SLA

                  Description

                  Starting at

                  $0.05369

                  per vCPU/hour

                  Memory

                  Description

                  Cloud SQL Enterprise

                  up to 624 GB

                  Price

                  Starting at

                  $0.007

                  per GB/hour

                  Cloud SQL Enterprise Plus

                  up to 824 GB

                  Description

                  Starting at

                  $0.0091

                  per GB/hour

                  Storage - SSD

                  Description

                  Storage and networking prices depend on the region where the instance is located; Cloud SQL Enterprise pricing and Cloud SQL Enterprise Plus pricing are the same

                  Price

                  $0.17

                  per GB/month

                  Storage - Local SSD

                  Description

                  This is only available for Cloud SQL Enterprise Plus

                  Price

                  $0.16

                  per GB/month

                  PITR Logs on Google Cloud Storage

                  Description

                  Cloud SQL Enterprise

                  Up to 7 days

                  Price

                  Free

                  Cloud SQL Enterprise Plus

                  Up to 35 days

                  Description

                  Free

                  Pricing Calculator

                  Estimate your monthly Cloud SQL costs, including region specific pricing and fees.

                  custom quote

                  Connect with our sales team to get a custom quote for your organization.

                  Start your proof of concept

                  New customers get $300 in free credits to try Cloud SQL and other Google Cloud products

                  Learn how to use Cloud SQL

                  What is MySQL?

                  Self managed MySQL vs Cloud SQL for MySQL

                  Best practice to set up MySQL instance

                  Business Case

                  More than 95% of Google Cloud’s top 100 customers use Cloud SQL


                  Chess.com logo

                  "Cloud SQL for MySQL has been a game-changer, reducing operational burdens and boosting teams’ satisfaction."

                  Grzegorz Dlugolecki, Principal Cloud and Kubernetes Engineer, Chess.com

                  Deploying Cloud SQL for MySQL for their core services enabled Chess.com to reduce the size of their environment resulting in significant cost savings and reduced latency. Specifically, the p99 latency response saw a remarkable drop of 71.4 percent — going from 14ms to an impressive 4ms.

                  Read customer story
                  Google Cloud
                  • ‪English‬
                  • ‪Deutsch‬
                  • ‪Español‬
                  • ‪Español (Latinoamérica)‬
                  • ‪Français‬
                  • ‪Indonesia‬
                  • ‪Italiano‬
                  • ‪Português (Brasil)‬
                  • ‪简体中文‬
                  • ‪繁體中文‬
                  • ‪日本語‬
                  • ‪한국어‬
                  Console
                  Google Cloud