Can u share your .env file?
php artisan: "no such file or directory"
Hi,
I'm getting this error if I type in something like php artisan make:model SomeModel
"Error: [PDOException]
SQLSTATE[HY000] [2002] No such file or directory "
This error disappears if I go to my .env file and change the DB_HOST to "127.0.0.1". But then, I get an error from the webpage, that it can't connect to the database:
"SQLSTATE[HY000] [2002] Connection refused"
Any ideas? The internet says I should add the "port" to the mysql-array in database.php. I did, but it didn't help.
Thank you
@Akeno Are you using homestead?
If yes i think you can only call php artisan make:model SomeModel from inside the vm using ssh.
From outside you need to set the port to 33060
Please or to participate in this conversation.