Reason of that error is using default params for database connection.
Probably You forgot to change values for database connection like DB_HOST, DB_DATABASE, DB_USERNAME, DB_PASSWORD inside .env file
if you done this but still have that error it means problem can be config was cached. To fix it, run:
php artisan config:clear
Try to reload (apache/nginx).
unix_socket problem
if you use
'unix_socket' => '/var/run/mysqld/mysqld.sock',
for mysql connection, try to check that socket address is correct.
run:
mysql> show variables like '%sock%';
Leave a Comment