I am having trouble connecting an App Engine application to a mysql cloud sql instance I have created. It is a PHP application which was created first and uploaded, and then I created the cloud SQL instance. It has been created and data was loaded into it (checked by adding an IPv4 address and then connected directly to it and even checked users and passwords). When I went to try and connect PDO it could not connect.
I then went and attempted to edit the SQL instance to set the preferred location to the App engine application and when I did I got the error "could not complete the operation." I have triple checked to make sure they are in the same region and they are both set to us-east1. I get the same error when I try to add the item in Authorized App Engine Applications.
I have checked to make sure the app engine id is correct and I believe it is. As an example if the appengine url is http://foo.appspot.com then the ID I am entering into the ID boxes is foo. In my case the example redacted ID would be along the lines of company-product (http://company-product.appspot.com/).
Does anyone know how I can fix this or diagnose what's wrong (other than could not complete operation)?