I have a Laravel 5.3 application which I have deployed using Google Application Engine. However, when I query my database, I am faced with the following error:
SQLSTATE[HY000] [2002] Connection refused (SQL: select * from `users` where `email` = test+support@loungeroom.nl limit 1)
My app.yaml
file contents are as follows:
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
I have followed all the steps listed in this tutorial. I have also ensured that my Cloud SQL API is enabled.