I'm fairly new GCP and cloud SQL and I am having trouble understanding the error I am receiving. I am trying to connect to a cloud sql instance using a cloud sql proxy sidecar. Configurations for cloud sql proxy seems correct, and I am listening on the proper ports. IAM service accounts have cloud sql client connect permissions and etc.
Within application, connection refusal happens during auto migration, when pods are restarted.
if err := client.Schema.Create(context.Background()); err != nil {
logger.Error("error", err)
}
To which I see this error in logs
{error: dial tcp 127.0.0.1:5432: connect: connection refused, level: error, msg: database error}
Hi @nicolette1,
Welcome to Google Cloud Community!