I am working on an app-engine-flexible PHP project, and am planning to use mysqli to connect to database. Here is my app.yaml
file:
runtime: php
env: flex
runtime_config:
document_root: web
## Uncomment for Cloud SQL
beta_settings:
cloud_sql_instances: "project-name:region:instance_name"
I could get the cloud SQL proxy to run on Windows, but I could not initialize my cloud SQL instance using TCP in my windows PC. I also could not connect using IP for local testing. I then decided their[sic] was no need for local testing.
I encountered another problem in trying to deploy the app using cloud SDK. It says:
an error occurred while parsing file app.yaml. Unexpected attribute 'cloud_sql_instances' for object of type AppInfoExternal in app.yaml file line 9, column 22
Your app.yaml
is misformatted, you need to indent the cloud_sql_instances
element:
runtime: php
env: flex
runtime_config:
document_root: web
## Uncomment for Cloud SQL
beta_settings:
cloud_sql_instances: "project-name:region:instance_name"
And of course, you need to update the values for that element as well and follow any other instructions for making the connection to Cloud SQL.