Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- 应用开发
- [概览](/develop/dev-guide-overview.md)
- 快速开始
- [使用 TiDB Cloud Serverless 构建 TiDB 集群](/develop/dev-guide-build-cluster-in-cloud.md)
- [使用 {{{ .starter }}} 构建 TiDB 集群](/develop/dev-guide-build-cluster-in-cloud.md)
- [使用 TiDB 的增删改查 SQL](/develop/dev-guide-tidb-crud-sql.md)
- 示例程序
- Java
Expand Down
4 changes: 2 additions & 2 deletions _docHome.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ TiDB Cloud 核心特性与应用场景简介

</DocHomeCard>

<DocHomeCard href="/tidbcloud/tidb-cloud-quickstart" label="快速上手 TiDB Cloud Serverless" icon="cloud-getstarted-mauve">
<DocHomeCard href="/tidbcloud/tidb-cloud-quickstart" label="快速上手 {{{ .starter }}}" icon="cloud-getstarted-mauve">

快速了解和使用 TiDB Cloud

</DocHomeCard>

<DocHomeCard href="/tidbcloud/dev-guide-overview" label="开发者指南" icon="cloud-developer-mauve">

使用你熟悉的语言或框架连接到 TiDB Cloud Serverless
使用你熟悉的语言或框架连接到 {{{ .starter }}}

</DocHomeCard>

Expand Down
2 changes: 1 addition & 1 deletion develop/dev-guide-bookshop-schema-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ tiup demo bookshop prepare --users=200000 --books=500000 --authors=100000 --rati

3. 在 **Import Data from Amazon S3** 页面,配置以下源数据信息:

- **Import File Count**:对于 TiDB Cloud Serverless,选择 **Multiple files**。TiDB Cloud Dedicated 中没有该字段。
- **Import File Count**:对于 {{{ .starter }}},选择 **Multiple files**。TiDB Cloud Dedicated 中没有该字段。
- **Included Schema Files**:选择 **Yes**
- **Data Format**:选择 **SQL**
- **Folder URI**:输入 `s3://developer.pingcap.com/bookshop/`
Expand Down
22 changes: 11 additions & 11 deletions develop/dev-guide-build-cluster-in-cloud.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
---
title: 使用 TiDB Cloud Serverless 构建 TiDB 集群
summary: 使用 TiDB Cloud Serverless 构建 TiDB 集群,并连接 TiDB Cloud Serverless 集群。
title: 使用 {{{ .starter }}} 构建 TiDB 集群
summary: 使用 {{{ .starter }}} 构建 TiDB 集群,并连接 {{{ .starter }}} 集群。
---

<!-- markdownlint-disable MD029 -->

# 使用 TiDB Cloud Serverless 构建 TiDB 集群
# 使用 {{{ .starter }}} 构建 TiDB 集群

本文将介绍如何以最快的方式开始使用 TiDB。你将创建并启动一个 [TiDB Cloud Serverless](https://www.pingcap.com/tidb-serverless/) 集群,使用 TiDB SQL 客户端,插入数据。随后将从示例程序读取出数据。
本文将介绍如何以最快的方式开始使用 TiDB。你将创建并启动一个 [{{{ .starter }}}](https://www.pingcap.com/tidb-serverless/) 集群,使用 TiDB SQL 客户端,插入数据。随后将从示例程序读取出数据。

若你需要在本地计算机上启动 TiDB,请参阅[本地启动 TiDB](/quick-start-with-tidb.md)。

## 第 1 步:创建 TiDB Cloud Serverless 集群
## 第 1 步:创建 {{{ .starter }}} 集群 {#step-1-create-a-tidb-cloud-cluster}

1. 如果你还未拥有 TiDB Cloud 账号,请先在此[注册](https://tidbcloud.com/free-trial)。
2. 使用你的 TiDB Cloud 账号[登录](https://tidbcloud.com/)。

登录后,默认进入 [**Clusters**](https://tidbcloud.com/console/clusters) 页面。

3. 对于新注册的用户,TiDB Cloud 会自动为你创建一个 TiDB Cloud Serverless 集群 `Cluster0`。你可以使用这个默认集群进行后续操作,也可以自行创建一个新的 TiDB Cloud Serverless 集群。
3. 对于新注册的用户,TiDB Cloud 会自动为你创建一个 {{{ .starter }}} 集群 `Cluster0`。你可以使用这个默认集群进行后续操作,也可以自行创建一个新的 {{{ .starter }}} 集群。

如果你想创建一个新的 TiDB Cloud Serverless 集群,请进行以下操作:
如果你想创建一个新的 {{{ .starter }}} 集群,请进行以下操作:

1. 点击 **Create Cluster**。
2. **Create Cluster** 页面默认选择 **Serverless**。你可以根据需要修改集群名称、选择可用区,然后点击 **Create**。你的 TiDB Cloud Serverless 集群将于 30 秒后创建完毕。
2. **Create Cluster** 页面默认选择 **Serverless**。你可以根据需要修改集群名称、选择可用区,然后点击 **Create**。你的 {{{ .starter }}} 集群将于 30 秒后创建完毕。

4. 点击目标集群名称,进入集群概览页面,然后点击右上角的 **Connect** 按钮,弹出连接对话框。

Expand All @@ -33,7 +33,7 @@ summary: 使用 TiDB Cloud Serverless 构建 TiDB 集群,并连接 TiDB Cloud

> **注意:**
>
> 在连接到 [TiDB Cloud Serverless](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-serverless) 集群时,你需要给用户名加上前缀并使用单引号包裹用户名。你可以在 [TiDB Cloud Serverless 用户名前缀](https://docs.pingcap.com/tidbcloud/select-cluster-tier#user-name-prefix) 中获得更多信息。
> 在连接到 [{{{ .starter }}}](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-serverless) 集群时,你需要给用户名加上前缀并使用单引号包裹用户名。你可以在 [{{{ .starter }}} 用户名前缀](https://docs.pingcap.com/tidbcloud/select-cluster-tier#user-name-prefix) 中获得更多信息。

## 第 2 步:连接到集群

Expand Down Expand Up @@ -116,8 +116,8 @@ summary: 使用 TiDB Cloud Serverless 构建 TiDB 集群,并连接 TiDB Cloud

> **注意:**
>
> - 在连接 TiDB Cloud Serverless 集群时,[必须使用 TLS 连接](https://docs.pingcap.com/tidbcloud/secure-connections-to-serverless-tier-clusters)。
> - 如果你在连接时遇到问题,可阅读 [TiDB Cloud Serverless 集群安全连接](https://docs.pingcap.com/tidbcloud/secure-connections-to-serverless-tier-clusters) 来获得更多信息。
> - 在连接 {{{ .starter }}} 集群时,[必须使用 TLS 连接](https://docs.pingcap.com/tidbcloud/secure-connections-to-serverless-tier-clusters)。
> - 如果你在连接时遇到问题,可阅读 [{{{ .starter }}} 集群安全连接](https://docs.pingcap.com/tidbcloud/secure-connections-to-serverless-tier-clusters) 来获得更多信息。

3. 填写密码,完成登录。

Expand Down
2 changes: 1 addition & 1 deletion develop/dev-guide-create-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ summary: 创建数据库的方法、规范及例子。

在阅读本页面之前,你需要准备以下事项:

- [使用 TiDB Cloud Serverless 构建 TiDB 集群](/develop/dev-guide-build-cluster-in-cloud.md)。
- [使用 {{{ .starter }}} 构建 TiDB 集群](/develop/dev-guide-build-cluster-in-cloud.md)。
- 阅读[数据库模式概览](/develop/dev-guide-schema-design-overview.md)。

## 什么是数据库
Expand Down
2 changes: 1 addition & 1 deletion develop/dev-guide-create-secondary-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ summary: 创建二级索引的方法、规范及例子。

在阅读本页面之前,你需要准备以下事项:

- [使用 TiDB Cloud Serverless 构建 TiDB 集群](/develop/dev-guide-build-cluster-in-cloud.md)。
- [使用 {{{ .starter }}} 构建 TiDB 集群](/develop/dev-guide-build-cluster-in-cloud.md)。
- 阅读[数据库模式概览](/develop/dev-guide-schema-design-overview.md)。
- [创建一个数据库](/develop/dev-guide-create-database.md)。
- [创建表](/develop/dev-guide-create-table.md)。
Expand Down
4 changes: 2 additions & 2 deletions develop/dev-guide-create-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ summary: 创建表的方法、规范及例子。

在阅读本页面之前,你需要准备以下事项:

- [使用 TiDB Cloud Serverless 构建 TiDB 集群](/develop/dev-guide-build-cluster-in-cloud.md)。
- [使用 {{{ .starter }}} 构建 TiDB 集群](/develop/dev-guide-build-cluster-in-cloud.md)。
- 阅读[数据库模式概览](/develop/dev-guide-schema-design-overview.md)。
- [创建一个数据库](/develop/dev-guide-create-database.md)。

Expand Down Expand Up @@ -264,7 +264,7 @@ ALTER TABLE `bookshop`.`ratings` SET TIFLASH REPLICA 1;

> **注意:**
>
> 如果你的集群,不包含 TiFlash 节点,此 SQL 语句将会报错:`1105 - the tiflash replica count: 1 should be less than the total tiflash server count: 0` 你可以[使用 TiDB Cloud Serverless 构建 TiDB 集群](/develop/dev-guide-build-cluster-in-cloud.md#-1-步创建-tidb-cloud-serverless-集群) 来创建一个含有 TiFlash 的集群。
> 如果你的集群,不包含 TiFlash 节点,此 SQL 语句将会报错:`1105 - the tiflash replica count: 1 should be less than the total tiflash server count: 0` 你可以[使用 {{{ .starter }}} 构建 TiDB 集群](/develop/dev-guide-build-cluster-in-cloud.md#step-1-create-a-tidb-cloud-cluster) 来创建一个含有 TiFlash 的集群。

随后正常进行查询即可:

Expand Down
2 changes: 1 addition & 1 deletion develop/dev-guide-delete-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ summary: 删除数据、批量删除数据的方法、最佳实践及例子。

在阅读本页面之前,你需要准备以下事项:

- [使用 TiDB Cloud Serverless 构建 TiDB 集群](/develop/dev-guide-build-cluster-in-cloud.md)。
- [使用 {{{ .starter }}} 构建 TiDB 集群](/develop/dev-guide-build-cluster-in-cloud.md)。
- 阅读[数据库模式概览](/develop/dev-guide-schema-design-overview.md),并[创建数据库](/develop/dev-guide-create-database.md)、[创建表](/develop/dev-guide-create-table.md)、[创建二级索引](/develop/dev-guide-create-secondary-indexes.md)。
- 需先[插入数据](/develop/dev-guide-insert-data.md)才可删除。

Expand Down
14 changes: 7 additions & 7 deletions develop/dev-guide-gui-mysql-workbench.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ TiDB 是一个兼容 MySQL 的数据库。[MySQL Workbench](https://www.mysql.co

> **注意**
>
> 本文档适用于 TiDB Cloud Serverless、TiDB Cloud Dedicated 和本地部署的 TiDB。
> 本文档适用于 {{{ .starter }}}、TiDB Cloud Dedicated 和本地部署的 TiDB。

## 前置需求

Expand All @@ -27,15 +27,15 @@ TiDB 是一个兼容 MySQL 的数据库。[MySQL Workbench](https://www.mysql.co

**如果你还没有 TiDB 集群,可以按如下方式创建一个:**

- (推荐方式)参考[创建 TiDB Cloud Serverless 集群](/develop/dev-guide-build-cluster-in-cloud.md),创建一个 TiDB Cloud 集群。
- (推荐方式)参考[创建 {{{ .starter }}} 集群](/develop/dev-guide-build-cluster-in-cloud.md),创建一个 TiDB Cloud 集群。
- 参考[部署本地测试 TiDB 集群](/quick-start-with-tidb.md#部署本地测试集群)或[部署正式 TiDB 集群](/production-deployment-using-tiup.md),创建一个本地集群。

## 连接到 TiDB

根据你选择的 TiDB 部署方式连接到 TiDB 集群。

<SimpleTab>
<div label="TiDB Cloud Serverless">
<div label="{{{ .starter }}}">

1. 在 TiDB Cloud 的 [**Clusters**](https://tidbcloud.com/console/clusters) 页面中,点击你目标集群的名字,进入集群的 **Overview** 页面。

Expand Down Expand Up @@ -64,15 +64,15 @@ TiDB 是一个兼容 MySQL 的数据库。[MySQL Workbench](https://www.mysql.co
- **Hostname**:输入从 TiDB Cloud 连接对话框中的得到的 `HOST` 参数。
- **Port**:输入从 TiDB Cloud 连接对话框中的得到的 `PORT` 参数。
- **Username**:输入从 TiDB Cloud 连接对话框中的得到的 `USERNAME` 参数。
- **Password**:点击 **Store in Keychain ...** 或 **Store in Vault**,输入 TiDB Cloud Serverless 集群的密码,然后点击 **OK** 保存密码。
- **Password**:点击 **Store in Keychain ...** 或 **Store in Vault**,输入 {{{ .starter }}} 集群的密码,然后点击 **OK** 保存密码。

![MySQL Workbench: store the password of TiDB Cloud Serverless in keychain](/media/develop/mysql-workbench-store-password-in-keychain.png)
![MySQL Workbench: store the password of {{{ .starter }}} in keychain](/media/develop/mysql-workbench-store-password-in-keychain.png)

下图显示了连接参数的示例:

![MySQL Workbench: configure connection settings for TiDB Cloud Serverless](/media/develop/mysql-workbench-connection-config-serverless-parameters.png)
![MySQL Workbench: configure connection settings for {{{ .starter }}}](/media/develop/mysql-workbench-connection-config-serverless-parameters.png)

7. 点击 **Test Connection** 以验证与 TiDB Cloud Serverless 集群的连接。
7. 点击 **Test Connection** 以验证与 {{{ .starter }}} 集群的连接。

8. 如果连接测试成功,你可以看到 **Successfully made the MySQL connection** 信息。点击 **OK** 保存连接配置。

Expand Down
14 changes: 7 additions & 7 deletions develop/dev-guide-gui-navicat.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ TiDB 是一个兼容 MySQL 的数据库。[Navicat](https://www.navicat.com) 是

> **注意**
>
> 本文档适用于 TiDB Cloud Serverless、TiDB Cloud Dedicated 和本地部署的 TiDB。
> 本文档适用于 {{{ .starter }}}、TiDB Cloud Dedicated 和本地部署的 TiDB。

## 前置需求

Expand All @@ -23,15 +23,15 @@ TiDB 是一个兼容 MySQL 的数据库。[Navicat](https://www.navicat.com) 是

**如果你还没有 TiDB 集群,可以按如下方式创建一个:**

- (推荐方式)参考[创建 TiDB Cloud Serverless 集群](/develop/dev-guide-build-cluster-in-cloud.md),创建一个 TiDB Cloud 集群。
- (推荐方式)参考[创建 {{{ .starter }}} 集群](/develop/dev-guide-build-cluster-in-cloud.md),创建一个 TiDB Cloud 集群。
- 参考[部署本地测试 TiDB 集群](/quick-start-with-tidb.md#部署本地测试集群)或[部署正式 TiDB 集群](/production-deployment-using-tiup.md),创建一个本地集群。

## 连接到 TiDB

根据你选择的 TiDB 部署方式连接到 TiDB 集群。

<SimpleTab>
<div label="TiDB Cloud Serverless">
<div label="{{{ .starter }}}">

1. 在 TiDB Cloud 的 [**Clusters**](https://tidbcloud.com/console/clusters) 页面中,点击你目标集群的名字,进入集群的 **Overview** 页面。

Expand Down Expand Up @@ -60,15 +60,15 @@ TiDB 是一个兼容 MySQL 的数据库。[Navicat](https://www.navicat.com) 是
- **Host**:输入从 TiDB Cloud 连接对话框中的得到的 `HOST` 参数。
- **Port**:输入从 TiDB Cloud 连接对话框中的得到的 `PORT` 参数。
- **User Name**:输入从 TiDB Cloud 连接对话框中的得到的 `USERNAME` 参数。
- **Password**:输入 TiDB Cloud Serverless 集群的密码。
- **Password**:输入 {{{ .starter }}} 集群的密码。

![Navicat: configure connection general panel for TiDB Cloud Serverless](/media/develop/navicat-premium-connection-config-serverless-general.png)
![Navicat: configure connection general panel for {{{ .starter }}}](/media/develop/navicat-premium-connection-config-serverless-general.png)

7. 点击 **SSL** 选项卡,选择 **Use SSL**,**Use authentication** 以及 **Verify server certificate against CA** 复选框。并在 **CA Certificate** 字段中填入从 TiDB Cloud 连接对话框中获取的 `CA` 文件路径。

![Navicat: configure connection SSL panel for TiDB Cloud Serverless](/media/develop/navicat-premium-connection-config-serverless-ssl.png)
![Navicat: configure connection SSL panel for {{{ .starter }}}](/media/develop/navicat-premium-connection-config-serverless-ssl.png)

8. 点击 **Test Connection** 以验证与 TiDB Cloud Serverless 集群的连接。
8. 点击 **Test Connection** 以验证与 {{{ .starter }}} 集群的连接。

9. 如果连接测试成功,你可以看到 **Connection Successful** 信息。点击 **OK** 完成连接配置。

Expand Down
2 changes: 1 addition & 1 deletion develop/dev-guide-insert-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ summary: 插入数据、批量导入数据的方法、最佳实践及例子。

在阅读本页面之前,你需要准备以下事项:

- [使用 TiDB Cloud Serverless 构建 TiDB 集群](/develop/dev-guide-build-cluster-in-cloud.md)。
- [使用 {{{ .starter }}} 构建 TiDB 集群](/develop/dev-guide-build-cluster-in-cloud.md)。
- 阅读[数据库模式概览](/develop/dev-guide-schema-design-overview.md),并[创建数据库](/develop/dev-guide-create-database.md)、[创建表](/develop/dev-guide-create-table.md)、[创建二级索引](/develop/dev-guide-create-secondary-indexes.md)。

## 插入行
Expand Down
14 changes: 7 additions & 7 deletions develop/dev-guide-proxysql-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ systemctl start docker

### 选项 1: 集成 TiDB Cloud 与 ProxySQL

在这个集成中,你将使用 [ProxySQL Docker 镜像](https://hub.docker.com/r/proxysql/proxysql)以及 TiDB Cloud Serverless 集群。下面的步骤将在端口 `16033` 上设置 ProxySQL,请确保此端口可用。
在这个集成中,你将使用 [ProxySQL Docker 镜像](https://hub.docker.com/r/proxysql/proxysql)以及 {{{ .starter }}} 集群。下面的步骤将在端口 `16033` 上设置 ProxySQL,请确保此端口可用。

#### 步骤 1. 创建一个 TiDB Cloud Serverless 集群
#### 步骤 1. 创建一个 {{{ .starter }}} 集群

1. 参考[创建一个 TiDB Cloud Serverless 集群](https://docs.pingcap.com/tidbcloud/tidb-cloud-quickstart#step-1-create-a-tidb-cluster)文档。记住为集群设置的 root 密码。
1. 参考[创建一个 {{{ .starter }}} 集群](https://docs.pingcap.com/tidbcloud/tidb-cloud-quickstart#step-1-create-a-tidb-cluster)文档。记住为集群设置的 root 密码。
2. 获取集群的 `hostname`、`port` 及 `username` 供后续使用。

1. 在 [Clusters](https://tidbcloud.com/console/clusters) 页面,点击你的集群名称,进入集群概览页面。
Expand Down Expand Up @@ -327,12 +327,12 @@ systemctl start docker
>
> 1. 使用集群的用户名和密码添加一个 ProxySQL 用户。
> 2. 将该用户分配给监控账户。
> 3. 将你的 TiDB Cloud Serverless 集群添加到主机列表中。
> 4. 在 ProxySQL 和 TiDB Cloud Serverless 集群之间启用安全连接。
> 3. 将你的 {{{ .starter }}} 集群添加到主机列表中。
> 4. 在 ProxySQL 和 {{{ .starter }}} 集群之间启用安全连接。
>
> 为了更好地理解此处的配置流程,强烈建议查看 `proxysql-prepare.sql` 文件。关于 ProxySQL 配置的更多信息,参考 [ProxySQL 文档](https://proxysql.com/documentation/proxysql-configuration/)。

下面是一个输出示例。输出中显示集群的主机名,这意味着 ProxySQL 和 TiDB Cloud Serverless 集群之间的连接建立成功。
下面是一个输出示例。输出中显示集群的主机名,这意味着 ProxySQL 和 {{{ .starter }}} 集群之间的连接建立成功。

```
*************************** 1. row ***************************
Expand Down Expand Up @@ -388,7 +388,7 @@ systemctl start docker
SELECT VERSION();
```

如果输出了 TiDB 的版本信息,则表示你已经成功通过 ProxySQL 连接到 TiDB Cloud Serverless 集群。如需退出 MySQL 客户端,输入 `quit` 并按下 <kbd>Enter</kbd> 键。
如果输出了 TiDB 的版本信息,则表示你已经成功通过 ProxySQL 连接到 {{{ .starter }}} 集群。如需退出 MySQL 客户端,输入 `quit` 并按下 <kbd>Enter</kbd> 键。

> **注意:**
>
Expand Down
Loading
Loading