我有一个使用 Google Application Engine 部署的 Laravel 5.3 应用程序。但是,当我查询我的数据库时,我遇到了以下错误:
SQLSTATE[HY000] [2002] Connection refused (SQL: select * from `users` where `email` = test+support@loungeroom.nl limit 1)
我的app.yaml
文件内容如下:
runtime: php
env: flex
runtime_config:
document_root: public
# required on some platforms so ".env" is not skipped
skip_files: false
env_variables:
# The values here will override those in ".env". This is useful for
# production-specific configuration. However, feel free to set these
# values in ".env" instead if you prefer.
APP_LOG: errorlog
STORAGE_DIR: /tmp
MYSQL_DSN: mysql:unix_socket=/cloudsql/zoho-portal-159018:us-central1:zoho-portal;dbname=zoho_portal
MYSQL_USER: adeel
MYSQL_PASSWORD: pass
beta_settings:
cloud_sql_instances: zoho-portal-159018:us-central1:zoho-portal
我已按照本教程中列出的所有步骤进行操作。我还确保我的 Cloud SQL API 已启用。