Laravel - php artisan migrate - SQLSTATE[HY000] [14] unable to open database file

I have a problem. I pulled a Laravel project from Git, but I can't migrate the tables with the 'php artisan migrate' command. The error messages:

In Connection.php line 664: SQLSTATE[HY000] [14] unable to open database file (SQL: select * from sqlit e_master where type = 'table' and name = migrations)

In Connector.php line 67: SQLSTATE[HY000] [14] unable to open database file"

My .env file:

DB_CONNECTION=sqlite
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=database
DB_USERNAME=homestead
DB_PASSWORD=secret

My .env.dusk.local file:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=ot-admin-dusk
DB_USERNAME=root
DB_PASSWORD=

In the Sequel pro of course I created the database.

Thanks,


Solution 1:

If you are trying to use sqlite, remove the DB_HOST and DB_DATABASE keys from the .env file. Now create storage/database.sqlite and give it the relevant permissions.