prgrm
prgrm

Reputation: 3833

Cannot migrate databases using Laravel/Homestead

I am using Homestead for a Laravel project.

The Homestead database works fine while using it. I can read, edit, delete...

However when I try to use php artisan:migrate in the terminal I get this error:

SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES) 

So my application has access to the database, but not in the terminal.

Any help?

Upvotes: 0

Views: 383

Answers (2)

Rp9
Rp9

Reputation: 1963

php artisan config:clear

Running the above command will clear configuration cache file and hence laravel will read the fresh data from the .env file.

Upvotes: 2

Murugesan Rathinam
Murugesan Rathinam

Reputation: 158

Make sure your database credentials .

Configure those credentials in .env files

Restart your server after changes done.

Upvotes: 1

Related Questions