From 6d858c59b425b52052162ccd0dcdcd9382d0c0ab Mon Sep 17 00:00:00 2001 From: Yiran Date: Fri, 30 Aug 2024 14:33:49 +0800 Subject: [PATCH] chore: refine the connection description for SDKs --- docs/user-guide/ingest-data/for-iot/grpc-sdks/go.md | 1 + docs/user-guide/ingest-data/for-iot/grpc-sdks/template.md | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/user-guide/ingest-data/for-iot/grpc-sdks/go.md b/docs/user-guide/ingest-data/for-iot/grpc-sdks/go.md index c5c7e6516..c596e97b9 100644 --- a/docs/user-guide/ingest-data/for-iot/grpc-sdks/go.md +++ b/docs/user-guide/ingest-data/for-iot/grpc-sdks/go.md @@ -43,6 +43,7 @@ cfg := greptime.NewConfig("127.0.0.1"). // Enable secure connection if your server is secured by TLS // WithInsecure(false). // set authentication information + // If the database doesn't require authentication, just leave the username and password empty WithAuth("username", "password") cli, _ := greptime.NewClient(cfg) diff --git a/docs/user-guide/ingest-data/for-iot/grpc-sdks/template.md b/docs/user-guide/ingest-data/for-iot/grpc-sdks/template.md index e8d6069f6..c6c4734e5 100644 --- a/docs/user-guide/ingest-data/for-iot/grpc-sdks/template.md +++ b/docs/user-guide/ingest-data/for-iot/grpc-sdks/template.md @@ -12,9 +12,9 @@ For more information, refer to [Automatic Schema Generation](/user-guide/ingest- ## Connect to database -Username and password are always required to connect to GreptimeDB. -For how to set authentication to GreptimeDB, see [Authentication](/user-guide/clients/authentication.md). -Here we set the username and password when using the library to connect to GreptimeDB. +If you have set the [`--user-provider` configuration](/user-guide/clients/authentication.md) when starting GreptimeDB, +you will need to provide a username and password to connect to GreptimeDB. +The following example shows how to set the username and password when using the library to connect to GreptimeDB.