Skip to content

Commit

Permalink
changes in address
Browse files Browse the repository at this point in the history
  • Loading branch information
Nithunikzz committed Oct 27, 2023
1 parent fbd91ce commit 6243c98
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion client/pkg/clickhouse/db_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,13 @@ func NewDBClient(conf *config.Config) (DBInterface, error) {
// }
// }
stdconn := clickhouse.OpenDB(&clickhouse.Options{
Addr: []string{fmt.Sprintf("%s:%d?username=%s&password=%s", conf.DBAddress, conf.DbPort, conf.ClickHouseUsername, conf.ClickHousePassword)}})
Addr: []string{fmt.Sprintf("%s:%d?username=%s&password=%s", conf.DBAddress, conf.DbPort, conf.ClickHouseUsername, conf.ClickHousePassword)},
Debug: true,
Auth: clickhouse.Auth{
Username: conf.ClickHouseUsername,
Password: conf.ClickHousePassword,
},
})
if err := stdconn.Ping(); err != nil {
if exception, ok := err.(*clickhouse.Exception); ok {
fmt.Printf("[%d] %s \n%s\n", exception.Code, exception.Message, exception.StackTrace)
Expand Down

0 comments on commit 6243c98

Please sign in to comment.