# CloudSQL簡介

CloudSQL是Google提供的RDBMS形式的資料庫平台，可提供使用者快速的在Google Cloud上使用，Google Cloud並負責建置、管理、維護、備份資料庫等工作的管理，讓使用者在這部分可以無需花太多心思在維護底層資料庫的運作上。

## 支援資料庫

CloudSQL目前提供PostgreSQL(BETA)& MySQL二種資料庫環境。

* MySQL: 提供5.5, 5.6兩個版本。在CloudSQL中分為一代與二代。
* PostgreSQL: 提供9.6版本，目前為BETA階段。僅支援CloudSQL二代。

## CloudSQL特色

CloudSQL在GCP中是以Google Managed Service的方式呈現，透過Google管理的優勢提供使用者關聯式資料存取的服務。

### 由Google管理的週期性備份

CloudSQL提供一個定時週期性備份，讓您可以設定每天一次，一周共7次的備份循環，可以在服務建立之初就做好資料備份的設定。

### Google等級安全性

CloudSQL的資料備份、存取均會自動加密，並且符合SSAE 16, ISO 27001, PCI DSS v3.0, and HIPAA認證標準。

### 效能與擴展性

CloudSQL的效能部分：

* CloudSQL第一代提供差別式的效能選擇，讓使用者依據需求選用符合自身效能需求之級別。
* CloudSQL第二代則可提供高達10TB的存儲容量、25,000 IOPS與208GB RAM的高性能和可擴展性。

CloudSQL的擴展性部分：

* CloudSQL提供主機垂直擴展(即無需搬移您的茲料情況下，直接調整主機之大小)。
* 支援Master-Slave的水平擴展方式，提供可讀寫的Master Node與唯讀的Slave Node。

### 彈性計費方式

CloudSQL以分計費的計費方式，另外也可以針對長時間的使用選擇Package的計費方式，且結合GCE上的sustan use discount，在針對持續使用用戶上，將會提供折扣價格回饋用戶。

針對一代CloudSQL

* 以分計費
* Package計費方式

針對二代CloudSQL

* Sustain優惠

## 參考資料

* Google Cloud SQL: <https://cloud.google.com/sql/>
* 官方價格資訊：<https://cloud.google.com/sql/pricing>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gdgcloud-taipei.gitbook.io/google-cloud-platform-in-practice/google-cloud-shang-de-chu-cun-fu-wu/cloudsql/cloudsql-jian-jie.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
