I have deployed application on gcloud App Engine, I deployed successfully but getting SQLSTATE[HY000] [2002] No such file or directory while it working fine on local system. I am following https://cloud.google.com/community/tutorials/run-laravel-on-appengine-flexible this tutorial.
I also followed https://www.youtube.com/watch?v=QhQ1PrYH3q0&t=230s but getting same issue.
Webstie url : https://phpsipl1.appspot.com/
My app.yml file is:
runtime: php
env: flex
runtime_config:
document_root: public
# Ensure we skip ".env", which is only for local development
skip_files:
- .env
env_variables:
# Put production environment variables here.
APP_LOG: errorlog
APP_KEY: base64:DZaQGd2hg/irj0YeTQtZxb3bY6Em25gMlLmoY8oDK7E=
STORAGE_DIR: /tmp
CACHE_DRIVER: database
SESSION_DRIVER: database
DB_HOST: localhost
DB_DATABASE: blog
DB_USERNAME: root
DB_PASSWORD: target@2017
DB_SOCKET: "/cloudsql/phpsipl1:us-central1:phpsipl"
beta_settings:
cloud_sql_instances: "phpsipl1:us-central1:phpsipl"
Please help me.