11---
2- title : 搭建一个 TiDB Cloud Starter 集群
3- summary : 学习如何在 TiDB Cloud 中搭建一个 TiDB Cloud Starter 集群并连接到它。
2+ title : 构建 TiDB Cloud Starter 集群
3+ summary : 了解如何在 TiDB Cloud 中构建 TiDB Cloud Starter 集群并连接到它。
44---
55
66<!-- markdownlint-disable MD029 -->
77
8- # 搭建一个 TiDB Cloud Starter 集群
8+ # 构建 TiDB Cloud Starter 集群
99
1010<CustomContent platform =" tidb " >
1111
12- 本文档将带你快速上手 TiDB。你将使用 [ TiDB Cloud] ( https://www.pingcap.com/tidb-cloud ) 创建一个 TiDB Cloud Starter(原 Serverless) 集群,连接到该集群 ,并在其上运行一个示例应用程序。
12+ 本文档将带你快速上手 TiDB。你将使用 [ TiDB Cloud] ( https://www.pingcap.com/tidb-cloud ) 创建一个 TiDB Cloud Starter 集群,连接到它 ,并在其上运行一个示例应用程序。
1313
1414如果你需要在本地机器上运行 TiDB,请参见 [ 本地启动 TiDB] ( /quick-start-with-tidb.md ) 。
1515
1616</CustomContent >
1717
1818<CustomContent platform =" tidb-cloud " >
1919
20- 本文档将带你快速上手 TiDB Cloud。你将创建一个 TiDB 集群,连接到该集群 ,并在其上运行一个示例应用程序。
20+ 本文档将带你快速上手 TiDB Cloud。你将创建一个 TiDB 集群,连接到它 ,并在其上运行一个示例应用程序。
2121
2222</CustomContent >
2323
24- ## 第 1 步:创建一个 TiDB Cloud Starter 集群 {#step-1-create-a-tidb-cloud-cluster}
24+ ## 第 1 步. 创建 TiDB Cloud Starter 集群 {#step-1-create-a-tidb-cloud-cluster}
2525
26261 . 如果你还没有 TiDB Cloud 账号,请点击[ 这里] ( https://tidbcloud.com/free-trial ) 注册账号。
2727
28282 . [ 登录] ( https://tidbcloud.com/ ) 你的 TiDB Cloud 账号。
2929
30303 . 在 [ ** Clusters** ] ( https://tidbcloud.com/console/clusters ) 页面,点击 ** Create Cluster** 。
3131
32- 4 . 在 ** Create Cluster** 页面,** Starter** 默认已选中。如有需要,可修改默认集群名称,并选择你希望创建集群的区域 。
32+ 4 . 在 ** Create Cluster** 页面,** Starter** 默认已选中。如有需要,可修改默认集群名称,然后选择你希望创建集群的区域 。
3333
34- 5 . 点击 ** Create** 创建一个 TiDB Cloud Starter 集群。
34+ 5 . 点击 ** Create** 创建 TiDB Cloud Starter 集群。
3535
3636 你的 TiDB Cloud 集群将在大约 30 秒内创建完成。
3737
38386 . 集群创建完成后,点击你的集群名称进入集群概览页面,然后点击右上角的 ** Connect** 。此时会弹出连接对话框。
3939
40407 . 在对话框中,选择你偏好的连接方式和操作系统,以获取对应的连接字符串。本文档以 MySQL 客户端为例。
4141
42- 8 . 点击 ** Generate Password** 生成一个随机密码。生成的密码只会显示一次,请妥善保存。如果你没有设置 root 密码,将无法连接到集群。
42+ 8 . 点击 ** Generate Password** 生成一个随机密码。生成的密码只会显示一次,请妥善保存。如果你未设置 root 密码,将无法连接到集群。
4343
4444<CustomContent platform =" tidb " >
4545
4646> ** 注意:**
4747>
48- > 对于 [ TiDB Cloud Starter] ( https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-serverless ) 集群,连接集群时,必须在用户名中包含集群的前缀,并用引号包裹用户名。详细信息请参见 [ 用户名前缀] ( https://docs.pingcap.com/tidbcloud/select-cluster-tier#user-name-prefix ) 。
48+ > 对于 [ TiDB Cloud Starter] ( https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter ) 集群,连接集群时,必须在用户名中包含集群的前缀,并用引号包裹用户名。更多信息请参见 [ 用户名前缀] ( https://docs.pingcap.com/tidbcloud/select-cluster-tier#user-name-prefix ) 。
4949
5050</CustomContent >
5151
5252<CustomContent platform =" tidb-cloud " >
5353
5454> ** 注意:**
5555>
56- > 对于 [ TiDB Cloud Starter] ( https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-serverless ) 集群,连接集群时,必须在用户名中包含集群的前缀,并用引号包裹用户名。详细信息请参见 [ 用户名前缀] ( /tidb-cloud/select-cluster-tier.md#user-name-prefix ) 。
56+ > 对于 [ TiDB Cloud Starter] ( https://docs.pingcap.com/tidbcloud/select-cluster-tier#starter ) 集群,连接集群时,必须在用户名中包含集群的前缀,并用引号包裹用户名。更多信息请参见 [ 用户名前缀] ( /tidb-cloud/select-cluster-tier.md#user-name-prefix ) 。
5757
5858</CustomContent >
5959
60- ## 第 2 步: 连接到集群
60+ ## 第 2 步. 连接到集群
6161
62621 . 如果未安装 MySQL 客户端,请选择你的操作系统并按照以下步骤安装。
6363
6464<SimpleTab >
6565
6666<div label =" macOS " >
6767
68- 对于 macOS,如果尚未安装 [ Homebrew] ( https://brew.sh/index ) ,请先安装,然后运行以下命令安装 MySQL 客户端:
68+ 对于 macOS,如果你还没有安装 [ Homebrew] ( https://brew.sh/index ) ,请先安装,然后运行以下命令安装 MySQL 客户端:
6969
7070``` shell
7171brew install mysql-client
@@ -85,7 +85,7 @@ For compilers to find mysql-client you may need to set:
8585 export CPPFLAGS="-I/opt/homebrew/opt/mysql-client/include"
8686```
8787
88- 要将 MySQL 客户端添加到 PATH,请在上述输出中找到以下命令(如果你的输出与本文档不一致 ,请使用你输出中的对应命令)并运行:
88+ 要将 MySQL 客户端添加到 PATH,请在上述输出中找到以下命令(如果你的输出与本文档中的输出不一致 ,请使用你输出中的对应命令)并运行:
8989
9090``` shell
9191echo ' export PATH="/opt/homebrew/opt/mysql-client/bin:$PATH"' >> ~ /.zshrc
@@ -155,9 +155,9 @@ mysql Ver 15.1 Distrib 5.5.68-MariaDB, for Linux (x86_64) using readline 5.1
155155
156156< /CustomContent>
157157
158- 3. 输入密码以登录 。
158+ 3. 输入密码进行登录 。
159159
160- # # 第 3 步: 执行 SQL 语句
160+ # # 第 3 步. 执行 SQL 语句
161161
162162让我们尝试在 TiDB Cloud 上执行你的第一条 SQL 语句。
163163
@@ -181,12 +181,12 @@ SELECT 'Hello TiDB Cloud!';
181181
182182< CustomContent platform=" tidb" >
183183
184- 可以在 [Discord](https://discord.gg/DQZ2dy3cuc? utm_source=doc) 或 [Slack](https://slack.tidb.io/invite? team=tidb-community& channel=everyone& ref=pingcap-docs) 社区提问,或[提交支持工单](/support.md)。
184+ 欢迎在 [Discord](https://discord.gg/DQZ2dy3cuc? utm_source=doc) 或 [Slack](https://slack.tidb.io/invite? team=tidb-community& channel=everyone& ref=pingcap-docs) 社区提问,或[提交支持工单](/support.md)。
185185
186186< /CustomContent>
187187
188188< CustomContent platform=" tidb-cloud" >
189189
190- 可以在 [Discord](https://discord.gg/DQZ2dy3cuc? utm_source=doc) 或 [Slack](https://slack.tidb.io/invite? team=tidb-community& channel=everyone& ref=pingcap-docs) 社区提问,或[提交支持工单](https://tidb.support.pingcap.com/)。
190+ 欢迎在 [Discord](https://discord.gg/DQZ2dy3cuc? utm_source=doc) 或 [Slack](https://slack.tidb.io/invite? team=tidb-community& channel=everyone& ref=pingcap-docs) 社区提问,或[提交支持工单](https://tidb.support.pingcap.com/)。
191191
192192< /CustomContent>
0 commit comments