Sebastian Sulinski
Sebastian Sulinski

Reputation: 6055

Laravel 5 database.php set to sqlite - artisan uses mysql

I seem to be having a problem with artisan reading the default config/database.php file.

When I run for php artisan migrate:status - or any other migration related commands I get

exception 'PDOException' with message 'SQLSTATE[28000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)'

even though the default database connection name is set to sqlite, which doesn't require credentials of any kind.

My .env has APP_ENV=local and I'm running it under the local environment with PHP 5.6.2 using Mamp.

Upvotes: 0

Views: 1253

Answers (1)

Sebastian Sulinski
Sebastian Sulinski

Reputation: 6055

After calling php artisan I've noticed there is a command to clear the configuration cache file php artisan config:clear - then run php artisan config:cache to cache it with the applied changes - which solved the problem.

Upvotes: 2

Related Questions