Skip to content

Commit 04d4aac

Browse files
committed
feat: Add MySQL caching_sha2_password support for the proxy clients using unix sockets.
1 parent f537bfb commit 04d4aac

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/proxy/proxy.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,11 @@ func dialOptions(c Config, i InstanceConnConfig) []cloudsqlconn.DialOption {
297297
default:
298298
// assume public IP by default
299299
}
300+
if networkType(&c, i) == "unix" {
301+
opts = append(opts, cloudsqlconn.WithMdxClientProtocolType("uds"))
302+
} else {
303+
opts = append(opts, cloudsqlconn.WithMdxClientProtocolType("tcp"))
304+
}
300305

301306
return opts
302307
}

0 commit comments

Comments
 (0)