Cloud SQL overview

MySQL  |  PostgreSQL  |  SQL Server

Cloud SQL is a fully managed relational database service for MySQL,PostgreSQL, and SQL Server. This frees you from database administration tasks sothat you have more time to manage your data.

This page discusses basic concepts and terminology for Cloud SQL, whichprovides SQL data storage for Google Cloud. For a more in-depthexplanation of key concepts, see thekey termsandfeatures pages. For information about howCloud SQL databases compare with one another, seeCloud SQL feature support by databaseengine.

Use cases for Cloud SQL

Cloud SQL provides a cloud-based alternative to local MySQL, PostgreSQL,and SQL Server databases. You should use Cloud SQL if you want to spendless time managing your database and more time using it.

Many applications running on Compute Engine, App Engine and otherservices in Google Cloud use Cloud SQL for database storage.

What Cloud SQL provides

Cloud SQL offers many services so you don't have to build and maintainthem yourself. You can focus on your data and let Cloud SQL handle thefollowing operations:

What is a Cloud SQL instance?

Each Cloud SQL instance is powered by a virtual machine (VM) running on ahost Google Cloud server. Each VM operates the database program, such asMySQL Server, PostgreSQL, or SQL Server, and service agents that providesupporting services, such as logging and monitoring. The highavailability option also provides a standby VM in another zone with aconfiguration that's identical to the primary VM.

The database is stored on a scalable, durable network storage device called apersistent disk that attaches to the VM. A static IP address sits in frontof each VM to help make sure that the IP address an application connects topersists throughout the lifetime of the Cloud SQL instance.

Cloud SQL instance overview:

Database administration

Cloud SQL lets you create and delete databases and database users,but it isn't a database administration tool. There are many databaseadministration tools you can choose from, depending on your database engine,including the following:

Cloud SQL pricing

Cloud SQL pricing varies with your configuration settings, and depends on:

  • How much storage you provision, in GiB per month
  • How many CPUs you select for your Cloud SQL instance
  • How much memory you select for your Cloud SQL instance
  • Where you choose to host your data
  • How much network traffic leaves your instance
  • How many IP addresses you assign and use

Check out someCloud SQL pricingexamples. For more information, see thepricingpage.

You can create an account to evaluate how Cloud SQL performs in real-world scenarios. New customers also get $300 in free credits to spend on Cloud SQL to run, test, and deploy workloads. You won't be charged until you upgrade.

Sign up to try Cloud SQL for free.

Connect to a Cloud SQL managed database

Connecting to a Cloud SQL managed database is similar to connecting to aself-managed database. Depending on how you configure it, your Cloud SQLinstance has a public IP address (which can be accessed from outside ofGoogle Cloud, using the internet), or a private IP address (which can onlybe accessed through aVirtual Private Cloud (VPC) network).In addition, Cloud SQL provides different authorization options to controlwho is allowed to connect to your instance, such as theCloud SQL Auth Proxy.

For more details on how to connect, authorize, and authenticate to yourCloud SQL instance, see theConnecting Overview page.

Cloud SQL updates

Over the life of a Cloud SQL instance, two kinds of updates can occur:

  • Configuration updates, which are done by the user.
  • System updates, which are performed by Cloud SQL.

Configuration updates

As your database's usage grows and new workloads are added, you might want toupdate your database configuration to adapt accordingly. Configurationupdates include:

  • Increasing compute resources
  • Modifying a database flag
  • Enabling high availability

Although Cloud SQL makes these updates possible with the click of abutton, some configurationupdates can require downtime. However, Cloud SQL offers severaloptions to minimize downtime so that your databases canremain available.

System updates

Keeping the database instance up and running requires operational effort beyondconfiguration updates. Servers and disks need to be replaced and upgraded.Operating systems need to be patched as new vulnerabilities are discovered.Database programs need to be upgraded as the database software provider releasesnew features and fixes new issues. Normally, a database administratorperforms each of these updates regularly in order to ensure their systems stayreliable, protected, and up-to-date. Cloud SQL attends to these regularsystem updates for you, so you can spend less timemanaging your database and more time developing great applications.

The process Cloud SQL uses to perform system updates varies based onwhich part of the system is getting updated. In general, Cloud SQL systemupdates are divided into three categories: hardware updates, online updates, andmaintenance.

Hardware updates improve the physical infrastructure, such asswapping out a defective machine host or replacing an old disk.Google Cloud performs hardware updates without interruption to yourapplication. For example, when updating a database server, Google Clouduses live migration, an advanced technology that reliably migrates a VM from theoriginal host to a new one while the VM stays running.

Online updates enhance the software of the supporting service agents thatsit adjacent to the database program on the VM. These updates are performedwhile the database is up and running, serving traffic. Online updates do notcause downtime for your application.

Maintenance updates apply upgrades to theoperating system and the database program. Becausethese updates require an instance restart, they incur some downtime.For this reason, Cloud SQL lets you schedule maintenance to occurat a time that is the least disruptive to your application.If you're usingCloud SQL Enterprise Plus edition,then you can limit that downtime tosub-second downtime.

What's next

Try out one or more of the quickstarts for:

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-14 UTC.