mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-09-13 01:56:22 +08:00
fix: Fix the problem of abnormal addition of remote connections to th… (#9174)
Refs #9151
This commit is contained in:
parent
3867e536b2
commit
420537f092
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ func NewPostgresqlClient(conn client.DBInfo) (PostgresqlClient, error) {
|
|||
}
|
||||
escapedUsername := url.QueryEscape(conn.Username)
|
||||
escapedPassword := url.QueryEscape(conn.Password)
|
||||
connArgs := fmt.Sprintf("postgres://%s:%s@%s:%d/?sslmode=disable", escapedUsername, escapedPassword, conn.Address, conn.Port)
|
||||
connArgs := fmt.Sprintf("postgres://%s:%s@%s:%d/postgres?sslmode=disable", escapedUsername, escapedPassword, conn.Address, conn.Port)
|
||||
db, err := sql.Open("pgx", connArgs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Add table
Reference in a new issue