Search code examples
google-app-enginegoogle-cloud-sqlgoogle-flexible

GAE flex Connection String to first generation CloudSQL


I have a GAE flex application that uses sqlalchemy/mysql. I also have a Google CloadSQL mysql instance First Generation. Is it possible to connect a GAE flex environment to a First Generation CloudSQL instance without connecting as an external app (and thus needing to whitelist the world). The Google documentation states to use /cloudsql/<INSTANCE_CONNECTION_NAME> as the connection string. I've tried many different flavors, but I'm still unsuccessful.

Examples: mysql+pymysql://user:password@/cloudsql/<INSTANCE_CONNECTION_NAME> mysql+pymysql:///cloudsql/<INSTANCE_CONNECTION_NAME>

Is there a different driver that's needed?

Thanks


Solution

  • You are correct, it is not possible to connect GAE flex to CloudSQL 1st generation.

    The alternatives are:

    a. Use App Engine Standard App instead.

    b. Migrate the First Generation instance to a Second Generation one