How to create Google Cloud SQL proxy Postgres connection?

I’m running Airbyte locally on macOS (13.2.1 (22D68)) on localhost:8000. In the web UI I’m attempting to create a Postgres connection. I have Google Cloud SQL proxy running locally on localhost:5432. However, testing the connection fails:

The connection tests failed.

State code: 08001; Message: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

I’ve tried specifying instead of localhost, I’ve also tried running Google Cloud SQL proxy on a different port than 5432. Still doesn’t work.

Incidentally, I can successfully connect to Google Cloud SQL Proxy via other means: DBVisualizer, JetBrains DataGrip, Ruby scripts, Python Script, etc…

Any ideas?

I was able to get it to work after using the local machine’s I.P. address. Both in cloud-sql-proxy via the --address flag, and by using the I.P. has the host in the web ui. Thanks to Sean Zicari on the Slack channel for that suggestion!

In any case, most people will not hard-code their machine’s I.P. when using cloud-sql-proxy. The default is to use localhost.

I created a GitHub issue for this, 24751.