在Google应用引擎上连接到远程MySQL数据库 [英] Connecting to a remote MySQL database on Google app engine

查看:350
本文介绍了在Google应用引擎上连接到远程MySQL数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个应用程序,以在Google应用引擎上运行。通常情况下,如果使用Google Cloud SQL,我必须启用结算/付款。所以,一开始,我决定远程连接到另一台服务器上的mysql数据库。它完全脱机工作,但部署我的应用程序后,它没有工作。很显然,GAE不支持远程连接......还有其他方法可以解决这个问题吗?隧道?

I'm working on an application to run on Google app engine. Normally, I would have to enable billing/pay if am using Google Cloud SQL. So for a start, I decided to connect remotely to a mysql database on another server. It works perfectly offline but after deploying my app it didn't work. Clearly, GAE doesn't support remote connections ... Is there another way to go around this ? tunneling ?

注意:使用HTTP API从我的数据库返回信息...需要更多的编程工作。

NB: Using an HTTP API to return info from my database ... would require more programing efforts.

推荐答案

1.8.8 中,我们可以使用来自PHP的远程套接字。

In 1.8.8 we made it possible to use remote sockets from PHP.

您需要确保您的应用程序已启用计费功能,才能使远程套接字可用。一旦你这样做,你应该能够从你的应用程序引擎应用程序连接到远程MySQL数据库。

You'll need to make sure your application has billing enabled for remote sockets to be available. Once you do that you should be able to connect to a remote MySQL database from your app engine app.

这篇关于在Google应用引擎上连接到远程MySQL数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆