Member-only story
How to Connect Your Python Application to Cloud SQL Instance
Let’s Connect to Private Cloud SQL Using Cloud-SQL-Proxy
Are you trying to connect your Python application to your private Cloud SQL instance? And you don’t understand how to connect in the most secure and straightforward way. You are in the right place! I was you just minutes ago. Hehe!
In this article, I’ll show you how you can do it and explain why we’re doing it this way, so you understand the basics. Are you ready?
If you are not a member, Read the full article here!
What & why?
First, let me ask you this question: Assume you are in the development phase of an application. You are coding all night with VS Code and have MySQL Workbench installed on your local PC. How do you make that connection?
You merely enter your credentials for authentication, and you’re connected to the MySQL databases securely and privately, right?
However, if you use a Cloud SQL Instance, the database is no longer stored on your local computer. But you still need the same settings; in short, it must be secure and private for optimal security.
This is where “Cloud-SQL-Proxy” comes into play.