1

I need to connect several Postgres & MySQL Cloud SQL service from my ETL server. I am using SQL proxy to connect with this database services.

But problem is google doesn't allow default port for both MySQL and PostgreSQL, I can only connect with one instances at a time.

How I can change port number while creating SQL proxy connections ?

Md Sirajus Salayhin
  • 4,974
  • 5
  • 37
  • 46

1 Answers1

1

You can define different port numbers for different instances, like that:

./cloud_sql_proxy -instances=myProject:us-central1:myInstance=tcp:3306,myProject:us-central1:myInstance2=tcp:3307

This example is from GCP documentation: https://cloud.google.com/sql/docs/mysql/sql-proxy#multiple-instances