Sub/Pub connect to Cloud SQL

839 views
Skip to first unread message

juan reale

unread,
Feb 15, 2019, 4:07:59 PM2/15/19
to Google Cloud SQL discuss
I would know if the Cloud Sub/Pub can connect to Cloud SQL ? 
Thanks 

George (Cloud Platform Support)

unread,
Feb 25, 2019, 8:55:48 PM2/25/19
to Google Cloud SQL discuss
Hello Juan, 

It depends what you understand by connecting; in this context: directly connecting Cloud Pub/Sub with Cloud SQL doesn't seem to be an option. By contrast, you may benefit from using both features in conjunction with an application deployed to Flexible or Standard environment. 

There are Cloud Pub/Sub Triggers that trigger Cloud Functions, which, in their turn, provide a local socket interface to connect to Cloud SQL instances. This interface works for both MySQL and PostgreSQL instances. To connect to your Cloud SQL instance you can use the /cloudsql file system path. You may find related detail on the "Connecting to Cloud SQL" documentation page

If you provide more information on your application needs, we'll be happy to help further. 
Reply all
Reply to author
Forward
0 new messages