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
In your .env
file, change DB_HOST
from 127.0.0.1
to localhost
Put string:
DB_SOCKET=/Applications/MAMP/tmp/mysql/mysql.sock
after DB_PASSWORD=
It works for MAMP. Set your path to mysql.sock
Before you do changes as per instructed above,
command prompt
, running mysql.server
status or mysqld
status shall show the database status.dbuser
is allow to connect from '%'
or 'localhost'
or '127.0.0.1'
. If not, just grant the user access from '%'
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