Sample Header Ad - 728x90

How to get Google Cloud SQL Auth Proxy working on Windows (WSL)?

0 votes
1 answer
294 views
I am trying to run Google's Cloud SQL Auth Proxy on my Windows 11 machine under WSL (Windows Subsystem for Linux). I downloaded the Cloud SQL Auth Proxy 64-bit executable and run it and get these messages:
.\cloud-sql-proxy.x64.exe my-gcp-project:us-west1:my-postgres-1 --credentials-file=.\cloud-sql.json
2024/04/13 18:39:34 Authorizing with the credentials file at ".\\cloud-sql.json"
2024/04/13 18:39:35 [my-gcp-project:us-west1:my-postgres-1] Listening on 127.0.0.1:5432
2024/04/13 18:39:35 The proxy has started successfully and is ready for new connections!
So it looks good. However, when I try to connect I get a "Can't reach database server". In WSL I run netstat -a and do not see the port 5432 open. However, when I run netstat -ano under a PowerShell terminal I do see this
TCP    127.0.0.1:5432   0.0.0.0:0    LISTENING   11812
How do I make (and verify) that the local Auth Proxy endpoint is accessible under WSL?
Asked by rlandster (385 rep)
Apr 14, 2024, 01:51 AM
Last activity: May 20, 2025, 10:08 AM