From 6dfead6df69e5b9ddb5e445d173b60ca08b1cb08 Mon Sep 17 00:00:00 2001 From: lixz Date: Mon, 15 Oct 2018 09:20:28 +0800 Subject: [PATCH] AllowNativePasswords, if using the requested plugin failed --- driver.go | 1 + 1 file changed, 1 insertion(+) diff --git a/driver.go b/driver.go index ba1297825..13c6463f6 100644 --- a/driver.go +++ b/driver.go @@ -115,6 +115,7 @@ func (d MySQLDriver) Open(dsn string) (driver.Conn, error) { // try the default auth plugin, if using the requested plugin failed errLog.Print("could not use requested auth plugin '"+plugin+"': ", err.Error()) plugin = defaultAuthPlugin + mc.cfg.AllowNativePasswords = true authResp, addNUL, err = mc.auth(authData, plugin) if err != nil { mc.cleanup()