Bird
0
0

Given this command to start Cloud SQL Proxy:

medium📝 service behavior Q13 of 15
GCP - Cloud SQL and Databases
Given this command to start Cloud SQL Proxy:
cloud_sql_proxy -instances=my-project:us-central1:my-instance=tcp:3306
What happens when your application connects to localhost:3306?
AIt connects securely to the Cloud SQL instance through the proxy
BIt connects to a local MySQL server running on port 3306
CIt fails because port 3306 is blocked by default
DIt connects directly to Cloud SQL without encryption
Step-by-Step Solution
Solution:
  1. Step 1: Understand proxy port forwarding

    The proxy listens on localhost port 3306 and forwards connections securely to the Cloud SQL instance.
  2. Step 2: Analyze connection behavior

    Connecting to localhost:3306 goes through the proxy tunnel, not a local database, ensuring secure access.
  3. Final Answer:

    It connects securely to the Cloud SQL instance through the proxy -> Option A
  4. Quick Check:

    Localhost port = proxy tunnel to Cloud SQL [OK]
Quick Trick: Localhost port forwards securely via proxy to Cloud SQL [OK]
Common Mistakes:
  • Assuming connection is to local database
  • Thinking port 3306 is blocked by default
  • Believing connection skips encryption

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes