Skip to content

Commit 59cf199

Browse files
authored
fix: Fixed the problem that password verification failed when there is a # symbol in the MySQL password (msg="Error opening connection to database" err="Error 1045 (28000): Access denied for user 'USER'@'*.*.*.*' (using password: YES)") (#937)
Signed-off-by: ops <[email protected]>
1 parent cd4e163 commit 59cf199

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

config/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ var (
4848
Loose: true,
4949
// MySQL ini file can have boolean keys.
5050
AllowBooleanKeys: true,
51+
// Ignore the # character in the line to avoid password parsing failure when the MySQL password contains the # symbol
52+
IgnoreInlineComment: true,
53+
// Remove the first and last quotation marks
54+
UnescapeValueDoubleQuotes: true,
5155
}
5256

5357
err error

0 commit comments

Comments
 (0)