Laravel SQLSTATE[HY000] [2002] Connection refused

前端 未结 10 1407
情深已故
情深已故 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条回答
  •  清歌不尽
    2020-12-18 21:33

    Before you do changes as per instructed above,

    1. check if your database server running or not. If you are using command prompt, running mysql.server status or mysqld status shall show the database status.
    2. If the database is running, check if the dbuser is allow to connect from '%' or 'localhost' or '127.0.0.1'. If not, just grant the user access from '%'
    3. If you have done 1 and 2 and still can't connect, see if the db user is allow to access the schema. If not, grant access to the schema
    4. If you reach here and still got the same error, try to restart you web server.

提交回复
热议问题