简体   繁体   English

我可以从App Engine中托管的PHP应用程序连接Google Cloud SQL吗?

[英]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, 我想我可以,但是我读了一个FAQ表格的云sql页面 ,如下所示,

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? 我不能将云SQL用于我的PHP应用程序吗?

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 . 我有另一个问题,(我对云应用程序引擎很天真)我正在本地开发一个PHP应用程序 ,想到最后将它上传到谷歌应用程序引擎 Is there any way of doing it locally connect Cloud SQL ? 有没有办法在本地连接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/ 有关PHP和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. 对于本地开发,您需要获取Cloud SQL实例的IP地址,这是一项付费功能。

What I also suggest is that you install a local MySQL instance on your development workstation, it's far easier. 我还建议您在开发工作站上安装本地MySQL实例,这要容易得多。 Just make sure to update your db settings before deploying your application to App Engine in order to switch to your Cloud SQL instance. 只需确保在将应用程序部署到App Engine之前更新数据库设置,以便切换到Cloud SQL实例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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