Skip to content

Commit 6bcb97e

Browse files
author
Aurelien Gaston
committed
Fix mysql connection string
Signed-off-by: Aurelien Gaston <aurelien.gaston@krondor.fr>
1 parent 3a4a15f commit 6bcb97e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/storage/sql.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,11 @@ func pgconn(u *url.URL) string {
9292
func mysqlconn(u *url.URL) string {
9393
password, _ := u.User.Password()
9494
return fmt.Sprintf(
95-
"%s:%s@%s/%s?%s",
95+
"%s:%s@tcp(%s:%s)/%s?%s",
9696
u.User.Username(),
9797
password,
98-
u.Host,
98+
u.Hostname(),
99+
u.Port(),
99100
strings.TrimLeft(u.Path, "/"),
100101
u.RawQuery,
101102
)

0 commit comments

Comments
 (0)