[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-19 (世界標準時間)。"],[],[],null,["# Cloud SQL overview\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nCloud SQL is a fully managed relational database service for MySQL,\nPostgreSQL, and SQL Server. This frees you from database administration tasks so\nthat you have more time to manage your data.\n\nThis page discusses basic concepts and terminology for Cloud SQL, which\nprovides SQL data storage for Google Cloud. For a more in-depth\nexplanation of key concepts, see the [key terms](/sql/docs/key-terms)\nand [features](/sql/docs/features) pages. For information about how\nCloud SQL databases compare with one another, see\n[Cloud SQL feature support by database\nengine](/sql/docs/feature_support).\n\nUse cases for Cloud SQL\n-----------------------\n\nCloud SQL provides a cloud-based alternative to local MySQL, PostgreSQL,\nand SQL Server databases. You should use Cloud SQL if you want to spend\nless time managing your database and more time using it.\n\nMany applications running on Compute Engine, App Engine and other\nservices in Google Cloud use Cloud SQL for database storage.\n\nWhat Cloud SQL provides\n-----------------------\n\nCloud SQL offers many services so you don't have to build and maintain\nthem yourself. You can focus on your data and let Cloud SQL handle the\nfollowing operations:\n\n- [Backups](/sql/docs/mysql/backup-recovery/backups)\n- [High availability and failover](/sql/docs/mysql/high-availability)\n- [Network connectivity](/sql/docs/mysql/connect-overview)\n- [Export and import](/sql/docs/mysql/import-export)\n- [Maintenance and updates](/sql/docs/mysql/maintenance)\n- [Monitoring](/sql/docs/mysql/monitor-instance)\n- [Logging](/sql/docs/mysql/logging)\n\nWhat is a Cloud SQL instance?\n-----------------------------\n\nEach Cloud SQL instance is powered by a virtual machine (VM) running on a\nhost Google Cloud server. Each VM operates the database program, such as\nMySQL Server, PostgreSQL, or SQL Server, and service agents that provide\nsupporting services, such as logging and monitoring. The high\navailability option also provides a standby VM in another zone with a\nconfiguration that's identical to the primary VM.\n\nThe database is stored on a scalable, durable network storage device called a\n`persistent disk` that attaches to the VM. A static IP address sits in front\nof each VM to help make sure that the IP address an application connects to\npersists throughout the lifetime of the Cloud SQL instance.\n\nCloud SQL instance overview:\n\nDatabase administration\n-----------------------\n\nCloud SQL lets you create and delete databases and database users,\nbut it isn't a database administration tool. There are many database\nadministration tools you can choose from, depending on your database engine,\nincluding the following:\n\n- [phpMyAdmin](https://www.phpmyadmin.net/) for MySQL\n- [MySQL Workbench](https://www.mysql.com/products/workbench/) for MySQL\n- [Toad Edge](https://www.quest.com/products/toad-edge/) for MySQL and PostgreSQL\n- [pgAdmin.org](https://www.pgadmin.org/) for PostgreSQL\n- [SQL Server Management Studio](https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-ver15) for SQL Server\n- [Visual Studio Code](https://code.visualstudio.com/) for SQL Server\n\nCloud SQL pricing\n-----------------\n\nCloud SQL pricing varies with your configuration settings, and depends on:\n\n- How much storage you provision, in GiB per month\n- How many CPUs you select for your Cloud SQL instance\n- How much memory you select for your Cloud SQL instance\n- Where you choose to host your data\n- How much network traffic leaves your instance\n- How many IP addresses you assign and use\n\nCheck out some [Cloud SQL pricing\nexamples](/sql/docs/pricing-examples). For more information, see the [pricing](/sql/pricing)\npage.\n| 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.\n|\n| Sign up to [try Cloud SQL for free](https://console.cloud.google.com/freetrial?redirectPath=/sql).\n\nConnect to a Cloud SQL managed database\n---------------------------------------\n\nConnecting to a Cloud SQL managed database is similar to connecting to a\nself-managed database. Depending on how you configure it, your Cloud SQL\ninstance has a public IP address (which can be accessed from outside of\nGoogle Cloud, using the internet), or a private IP address (which can only\nbe accessed through a [Virtual Private Cloud (VPC) network](/vpc/docs/overview)).\nIn addition, Cloud SQL provides different authorization options to control\nwho is allowed to connect to your instance, such as the\n[Cloud SQL Auth Proxy](/sql/docs/mysql/sql-proxy).\n\nFor more details on how to connect, authorize, and authenticate to your\nCloud SQL instance, see the\n[Connecting Overview](/sql/docs/mysql/connect-overview) page.\n\nCloud SQL updates\n-----------------\n\nOver the life of a Cloud SQL instance, two kinds of updates can occur:\n\n- **Configuration updates**, which are done by the user.\n- **System updates**, which are performed by Cloud SQL.\n\n### Configuration updates\n\nAs your database's usage grows and new workloads are added, you might want to\nupdate your database configuration to adapt accordingly. Configuration\nupdates include:\n\n- Increasing compute resources\n- Modifying a database flag\n- Enabling high availability\n\nAlthough Cloud SQL makes these updates possible with the click of a\n[button](/sql/docs/mysql/edit-instance), some configuration\nupdates can require downtime. However, Cloud SQL offers several\noptions to minimize downtime so that your databases can\nremain available.\n\n### System updates\n\nKeeping the database instance up and running requires operational effort beyond\nconfiguration updates. Servers and disks need to be replaced and upgraded.\nOperating systems need to be patched as new vulnerabilities are discovered.\nDatabase programs need to be upgraded as the database software provider releases\nnew features and fixes new issues. Normally, a database administrator\nperforms each of these updates regularly in order to ensure their systems stay\nreliable, protected, and up-to-date. Cloud SQL attends to these regular\nsystem updates for you, so you can spend less time\nmanaging your database and more time developing great applications.\n\nThe process Cloud SQL uses to perform system updates varies based on\nwhich part of the system is getting updated. In general, Cloud SQL system\nupdates are divided into three categories: hardware updates, online updates, and\nmaintenance.\n\n**Hardware updates** improve the physical infrastructure, such as\nswapping out a defective machine host or replacing an old disk.\nGoogle Cloud performs hardware updates without interruption to your\napplication. For example, when updating a database server, Google Cloud\nuses live migration, an advanced technology that reliably migrates a VM from the\noriginal host to a new one while the VM stays running.\n\n**Online updates** enhance the software of the supporting service agents that\nsit adjacent to the database program on the VM. These updates are performed\nwhile the database is up and running, serving traffic. Online updates do not\ncause downtime for your application.\n\n[**Maintenance updates**](/sql/docs/mysql/maintenance) apply upgrades to the\noperating system and the database program. Because\nthese updates require an instance restart, they incur some downtime.\nFor this reason, Cloud SQL lets you schedule maintenance to occur\nat a time that is the least disruptive to your application.\n\nIf you're using [Cloud SQL Enterprise Plus edition](/sql/docs/mysql/editions-intro#availability-enhancements) for PostgreSQL\nor Cloud SQL Enterprise Plus edition for MySQL,\nthen you can limit that downtime to [sub-second downtime](/sql/docs/mysql/maintenance#nearzero).\n\n\nWhat's next\n-----------\n\nTry out one or more of the quickstarts for:\n\n- [MySQL](/sql/docs/mysql/connect-instance-cloud-shell)\n- [PostgreSQL](/sql/docs/postgres/connect-instance-cloud-shell)\n- [SQL Server](/sql/docs/sqlserver/connect-instance-cloud-shell)"]]