mirror of
https://github.com/minio/minio.git
synced 2025-02-04 02:15:59 -05:00
fix mysql config for native password authentication (#7436)
fixes #7430
This commit is contained in:
parent
16ba679103
commit
dd1d69ab5c
@ -205,11 +205,12 @@ func (target *MySQLTarget) Close() error {
|
|||||||
func NewMySQLTarget(id string, args MySQLArgs) (*MySQLTarget, error) {
|
func NewMySQLTarget(id string, args MySQLArgs) (*MySQLTarget, error) {
|
||||||
if args.DSN == "" {
|
if args.DSN == "" {
|
||||||
config := mysql.Config{
|
config := mysql.Config{
|
||||||
User: args.User,
|
User: args.User,
|
||||||
Passwd: args.Password,
|
Passwd: args.Password,
|
||||||
Net: "tcp",
|
Net: "tcp",
|
||||||
Addr: args.Host.String() + ":" + args.Port,
|
Addr: args.Host.String() + ":" + args.Port,
|
||||||
DBName: args.Database,
|
DBName: args.Database,
|
||||||
|
AllowNativePasswords: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
args.DSN = config.FormatDSN()
|
args.DSN = config.FormatDSN()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user