From 6d29e9fe16cbe645b59f38e1421412644bb541d0 Mon Sep 17 00:00:00 2001 From: Andrew Thornton Date: Wed, 27 May 2020 11:12:06 +0100 Subject: [PATCH] Default MSSQL port 0 to allow automatic detection by default Fix #11633 Signed-off-by: Andrew Thornton --- modules/setting/database.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/setting/database.go b/modules/setting/database.go index 85043e8c1159d..6bfb02ac41e66 100644 --- a/modules/setting/database.go +++ b/modules/setting/database.go @@ -163,7 +163,7 @@ func getPostgreSQLConnectionString(dbHost, dbUser, dbPasswd, dbName, dbParam, db // ParseMSSQLHostPort splits the host into host and port func ParseMSSQLHostPort(info string) (string, string) { - host, port := "127.0.0.1", "1433" + host, port := "127.0.0.1", "0" if strings.Contains(info, ":") { host = strings.Split(info, ":")[0] port = strings.Split(info, ":")[1]