• Register
0 votes

Problem :

I am currently using the Mac OS Yosemite and Laravel 5.0.

I am new to Laravel 5.0. In the local environment whenever I run the below command

 php artisan migrate 

I always encounter below error :

“Access denied for user 'homestead'@'localhost' (using password: YES)”

I am unable to fix above error. Any clue to fix the above error?

8 4 2
2,300 points

1 Answer

0 votes

Solution :

I came across your question. It is common error for beginners. I can tell you the reason behind your above mentioned laravel 5 error is the caching-issue of your .env.php file this is because the Laravel 5 is using your environment based on the configuration mentioned in your .env file.

You just need to follow below steps to fix the error.

1. You need to go to the application root directory and open the .env file. If you are in the ubuntu then it may be hidden so just press ctrl+h to show the hidden files & if that is not the case and you are in the terminal then you need to  type : ls -a to show the hidden files in the editor and simply update database configuration setting as shown below and then save your .env file


2. After that restart the apache web server and try to refresh your page and you are done

3. If still you are facing the issue then you need to run below command to clear your old config cache file.

php artisan config:clear

After executing above command you are done with the error

5 2 1
4,980 points

Related questions

0 votes
2 answers 2.4K views
Problem : I keep getting a below error with mysql connection through a XAMPP and I really don't know what to do: “Mysqli_real_connect(): (hy000/1045): access denied for user 'pma'@'localhost' (using password: no)” I have already reset my password from a MySql from a ... a changes to my code and to my php.ini file, but at each time it goes back to a error. Any help on this issue?
asked Jan 31 jwilliam 3.9k points
0 votes
1 answer 60 views
0 votes
2 answers 525 views
Problem : Whenever I want to open a mysql in my windows cmd by simply typing mysql. I am facing below error : “ERROR 1045 (28000): Access denied for user ODBC@localhost (using password: NO)” After that by looking at similar queries I somehow got the ... password=root ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password:NO) Any pointers will be the great help.
asked Dec 18, 2019 alecxe 7.5k points
0 votes
1 answer 16 views