连接到App Engine上的第二代云SQL灵活的PHP 7.0 - 丢失套接字 [英] Connecting to 2nd gen Cloud SQL on App Engine flexible PHP 7.0 - missing socket

查看:216
本文介绍了连接到App Engine上的第二代云SQL灵活的PHP 7.0 - 丢失套接字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我决定在App Engine上试用PHP 7,并遵循指示

然后我决定进入调试模式,看看发生了什么。结果发现代理容器正在运行, / cloudsql / 文件夹被创建,但是那里没有套接字:





这是我的 app.yaml



 运行时:php 
env:flex

manual_scaling:
实例:1

env_variables:
CLOUDSQL_UNIX_SOCKET:/ cloudsql / project-161108:us-east1:clod-sql-test
$ b beta_settings:
cloud_sql_instances:project- 161108:us-east1:clod-sql-test

这里是Cloud SQL实例信息(是的,我创建它时拼错了云):



我的问题是:如何让插座显示w这应该是?我已经花了2天的时间来解决这个问题,任何意见,将不胜感激....

解决方案

我的假设是, Google Cloud SQL API未启用。



转至以下链接并查看是否已启用。如果没有,请启用它。



https://console.cloud.google.com/apis/api/sqladmin.googleapis.com/overview?project=_



然后尝试重新部署应用程序(不幸的是您需要重新部署)。


I decided to try out PHP 7 on App Engine and have followed instructions here to connect to second gen Cloud SQL but I'm unable to get it working.

As a testing script I decided to upload PhpMyAdmin and got the following error upon attempting to login:

Then I decided to go into debug mode and see what's going on. Turns out that the proxy container is running, the /cloudsql/ folder is created but there is no socket there:

Here is my app.yaml:

runtime: php
env: flex

manual_scaling:
    instances: 1

env_variables:
    CLOUDSQL_UNIX_SOCKET: /cloudsql/project-161108:us-east1:clod-sql-test

beta_settings:
    cloud_sql_instances: "project-161108:us-east1:clod-sql-test"

Here is Cloud SQL instance info (yes, I misspelled cloud when creating it):

My question is: how can I make the socket appear where it's supposed to be? I've spent 2 days trying to fix this, any advice would be appreciated....

解决方案

My hypothesis is that the Google Cloud SQL API is not enabled.

Go to the following link and see if it's enabled. Enable it if not.

https://console.cloud.google.com/apis/api/sqladmin.googleapis.com/overview?project=_

Then try re-deploying the app (unfortunately you need to deploy it again).

这篇关于连接到App Engine上的第二代云SQL灵活的PHP 7.0 - 丢失套接字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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