Skip to content

Commit 9d4d290

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

File tree

7 files changed

+5
-6
lines changed

7 files changed

+5
-6
lines changed

internal/proxy/fuse.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
// limitations under the License.
1414

1515
//go:build !windows && !openbsd && !freebsd
16-
// +build !windows,!openbsd,!freebsd
1716

1817
package proxy
1918

internal/proxy/fuse_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
// limitations under the License.
1414

1515
//go:build !windows && !darwin
16-
// +build !windows,!darwin
1716

1817
package proxy_test
1918

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
}

internal/proxy/proxy_other.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
// limitations under the License.
1414

1515
//go:build !windows && !openbsd && !freebsd
16-
// +build !windows,!openbsd,!freebsd
1716

1817
package proxy
1918

internal/proxy/proxy_other_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
// limitations under the License.
1414

1515
//go:build !windows
16-
// +build !windows
1716

1817
package proxy_test
1918

internal/proxy/unix.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
// limitations under the License.
1414

1515
//go:build !windows
16-
// +build !windows
1716

1817
package proxy
1918

main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
// limitations under the License.
1414

1515
//go:build !windows
16-
// +build !windows
1716

1817
package main
1918

0 commit comments

Comments
 (0)