I have specified the unix_socket as /cloudsql/project:location:instance . (i.e. the instance connection name, not just the instance ID)
I have added it to the beta_settings, cloud_sql_instances in app.yaml.
I am connecting as a db user created through the Google Console from "any host" (%) -- but it also happens with the root user too
I am connecting using the pymysql library
This is during deployment to GAE Python flex environment, and the cloudsql instance is in the same project, so the GAE service account should be authorized.
From the traceback (below), it does appear to try to open a socket connection, rather than TCP/IP, but fails with the message "Can't connect to MySQL server on 'localhost' ([Errno 2] No such file or directory)".
Eric G
unread,
Jul 6, 2018, 11:09:19 AM7/6/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Cloud SQL discuss
Er, nevermind. The settings are correct, but I was trying to open a db connection before the service was completely updated, instead of per request.