$ php artisan migrate to sqlite but "No connection could be made because the target machine actively refused it"
I just started watching "Laravel from scratch" free series. In "Fetching data" episode https://laracasts.com/series/laravel-5-from-scratch/episodes/7 Jeffry tells about using sqlite database. I have exactly the same set up as Jeffry has but after $ php artisan migrate I receive
[PDOException]
SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.
I read a lot of answers on the topic. But all of them relates to MySQL, Redis or others "real" databases. Switching from "localhost" to "127.0.0.1" is not the case while using file-based database like sqlite. I try to debug a little and found that migrating script correctly resolves sqlite file path. Everything should by fine but... I tried also MySQL and Postgres - same result. I'm on Windows 10 Pro machine with PHP 7.0.7 TS CLI x64.
Any ideas why this happens with sqlite?
Hi, I was having the same issue. If you're currently playing about with the tutorials in a Windows environment and you're not using homestead - then by default you'll have an .env file located at the root of your project, that inside it says: