Laravel SQLSTATE[HY000] [2002] Connection refused

前端 未结 10 1384
情深已故
情深已故 2020-12-18 20:44

so I want to deploy my existing laravel porject into my digitalocean vps I user this tut and I upload my site successfully

also my env file is

APP_E         


        
10条回答
  •  梦毁少年i
    2020-12-18 21:41

    After long hours this worked for me:

    Changing the port in php My Admin previously 8889

    APP_NAME=laravel
    APP_ENV=local
    APP_KEY= YOUR KEY
    APP_DEBUG=true
    APP_URL=127.0.0.1
    
    LOG_CHANNEL=stack
    
    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_SOCKET=/Applications/MAMP/tmp/mysql/mysql.sock
    

    and then

    php artisan cache:clear
    php artisan route:clear
    php artisan config:clear
    php artisan view:clear
    

提交回复
热议问题