MySql: Fix password regression in MySQL datasource (#20376)
(cherry picked from commit 2ca1cc5645)
This commit is contained in:
committed by
Kyle Brandt
parent
1f3c557dfd
commit
a7ec4e8073
@@ -38,7 +38,7 @@ func newMysqlQueryEndpoint(datasource *models.DataSource) (tsdb.TsdbQueryEndpoin
|
|||||||
|
|
||||||
cnnstr := fmt.Sprintf("%s:%s@%s(%s)/%s?collation=utf8mb4_unicode_ci&parseTime=true&loc=UTC&allowNativePasswords=true",
|
cnnstr := fmt.Sprintf("%s:%s@%s(%s)/%s?collation=utf8mb4_unicode_ci&parseTime=true&loc=UTC&allowNativePasswords=true",
|
||||||
characterEscape(datasource.User, ":"),
|
characterEscape(datasource.User, ":"),
|
||||||
characterEscape(datasource.DecryptedPassword(), "@"),
|
datasource.DecryptedPassword(),
|
||||||
protocol,
|
protocol,
|
||||||
characterEscape(datasource.Url, ")"),
|
characterEscape(datasource.Url, ")"),
|
||||||
characterEscape(datasource.Database, "?"),
|
characterEscape(datasource.Database, "?"),
|
||||||
|
|||||||
Reference in New Issue
Block a user