Skip to content

Commit

Permalink
the zh content
Browse files Browse the repository at this point in the history
  • Loading branch information
nicecui committed Aug 30, 2024
1 parent 6d858c5 commit 0b02665
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ cfg := greptime.NewConfig("127.0.0.1").
// 如果服务配置了 TLS ,设置 TLS 选项来启用安全连接
// WithInsecure(false).
// 设置鉴权信息
// 如果数据库不需要鉴权,将用户名和密码留空即可
WithAuth("username", "password")

cli, _ := greptime.NewClient(cfg)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ GreptimeDB 提供了用于高吞吐量数据写入的 ingester 库。

## 连接数据库

连接 GreptimeDB 时,通常需要用户名和密码。
关于如何设置 GreptimeDB 的鉴权方式,请参考[鉴权](/user-guide/clients/authentication.md)
这里我们在使用 ingester 库连接 GreptimeDB 时设置用户名和密码
如果你在启动 GreptimeDB 时设置了 [`--user-provider`](/user-guide/clients/authentication.md)
则需要提供用户名和密码才能连接到 GreptimeDB。
以下示例显示了使用 SDK 连接到 GreptimeDB 时如何设置用户名和密码

<InjectContent id="ingester-lib-connect" content={props.children}/>

Expand Down

0 comments on commit 0b02665

Please sign in to comment.