Greetings!  You probably should be following this guide:
https://cloud.google.com/appengine/docs/flexible/php/using-cloud-sql

Specifically, looks like you're missing this piece:

# Use the connection name obtained when configuring your Cloud SQL instance.
beta_settings:
    cloud_sql_instances: "CONNECTION_NAME"


Good luck!

On Thu, Apr 27, 2017 at 9:41 PM, Adeel Ahmad <adeelahmadadl1...@gmail.com>
wrote:

> I have set up my Laravel 5.3 project on GAE using gcloud. My app.yaml file
> looks like this:
>
> 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:z
> oho-portal;dbname=zoho_portal
>   MYSQL_USER: USER
>   MYSQL_PASSWORD: PASS
>
> However, when I query my database using eloquent I receive this error:
>
> SQLSTATE[HY000] [2002] Connection refused
>
>
> I followed this guideline: https://cloud.google.com/sql/
> docs/mysql/connect-app-engine?hl=en_US&_ga=1.259065737.
> 2061084871.1491404918
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-appengine+unsubscr...@googlegroups.com.
> To post to this group, send email to google-appengine@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-appengine.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/google-appengine/3b1065c1-e6e5-4247-9db2-
> d5f3cf2e77a9%40googlegroups.com
> <https://groups.google.com/d/msgid/google-appengine/3b1065c1-e6e5-4247-9db2-d5f3cf2e77a9%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Justin Beckwith | Google Cloud Platform | @justinbeckwith
<http://twitter.com/JustinBeckwith> | http://jbeckwith.com

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/CADd%3D1Q2nNtCBv08L62CYG2UBxpOP-3YfuRVmUXZ3uwp-H%3DWF6w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to