title: Accessing Cloud SQL from another GCP project
body: <p>I want to connect to Cloud SQL from a different GCP project.</p>
  
  <p>Cloud SQL is location in ProjectSQL and a VPC network is there in ProjectSQL project with name sql_vpc</p>
  
  <p>There is another project ProjectDataflow and this has a vpc dataflow_vpc. I want to connect to cloudSQL from ProjectSQL with the VM launched in ProjectDataflow project</p>
  
  <p>Things I have tried with success and failure.</p>
  
  <p>Private ACCESS:</p>
  
  <p>VPC Peering:</p>
  
  <pre><code>Enable Private IP access in Cloud with the vpc sql_vpc
  Creating VPC peering between dataflow_vpc and sql_vpc
  This solution does not work because you can not access the Peered Network.
  https://cloud.google.com/sql/docs/mysql/private-ip
  Status: FAILED
  </code></pre>
  
  <p>Shared Network</p>
  
  <pre><code>As per doc I can create the CloudSQL in shared VPC network, that says I 
  have to create the CloudSQL in host project, and to access the Cloud 
  SQL from  VM instance, it has be in the same network as of authorized 
  private ip network of Cloud SQL
  Status: NOT TRIED but looks to be Negative
  </code></pre>
  
  <p>Public Access:</p>
  
  <pre><code>Create a Cloud NAT in ProjectDataflow with dataflow_vpc with manual IP
  Use the Cloud NAT public ip to whitelist in CloudSQL instance
  Now I can access the CloudSQL from project ProjectDataflow using CloudSQL Public IP
  STATUS: Success
  </code></pre>
  
  <p>Please share your experience accessing Cloud SQL from another project.
  Is there any best practice to connect cloud SQL from another gcp project?</p>