Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

Using the Cloud SQL Auth proxy to connect to multiple instances

    # Start the Cloud SQL Auth proxy to connect to two different Cloud SQL instances    # Give the Cloud SQL Auth proxy a unique port on your machine to use for each Cloud SQL instance.    ./cloud_sql_proxy -instances=myProject:us-central1:myInstance=tcp:5432,myProject:us-central1:myInstance2=tcp:1234    # Connect to "myInstance" using port 5432 on your machine:    psql -U myUser -h 127.0.0.1  --port 5432    # Connect to "myInstance2" using port 1234 on your machine:    psql -U myUser -h 127.0.0.1  --port 1234  
Source by cloud.google.com #
 
PREVIOUS NEXT
Tagged: #Using #Cloud #SQL #Auth #proxy #connect #multiple #instances
ADD COMMENT
Topic
Name
5+9 =