简体   繁体   中英

Can I connect Google Cloud SQL from PHP application Hosted in App Engine?

I think I can, But I read a FAQ form cloud sql page , as follows,

Q. Can I use languages other than Java or Python?
A.   Only Java and Python are supported for Google Cloud SQL.

What is it supposed to mean? What are they referring to? Can't I use cloud SQL for my PHP app?

I have another question, (I'm so naive to cloud app engine) I'm developing a PHP application locally , thought of upload it finally to google app engine . Is there any way of doing it locally connect Cloud SQL ? So that I could make sure. Otherwise It's hard to update uploaded application thousands of times per day during development . Hope you understood my question.

Yes you can. See the documentation here for PHP and Cloud SQL: https://developers.google.com/appengine/docs/php/cloud-sql/

As for local development, you need to get an IP Address for your Cloud SQL instance, which is a paying feature.

What I also suggest is that you install a local MySQL instance on your development workstation, it's far easier. Just make sure to update your db settings before deploying your application to App Engine in order to switch to your Cloud SQL instance.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM