agCepeda's avatar

Issue - database connection data changed

Hi! Everyone, i have and issue in the lumen framework.

I'm building a REST API and i have two projects with lumen, one is the client and another one is the API.

When i test the API project all is correct. But if i try to make a request from the client, the API change the database connection data and use the default connection.

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

Someone have some idea of what is going on ?

0 likes
1 reply
AddWebContribution's avatar

The reason of Access denied for user ‘homestead’@’localhost’ laravel 5 error is caching-issue in the .env file cause Laravel 5 is using environment based configuration in your .env file

  1. You can update your .env file like :
DB_HOST=localhost
DB_DATABASE=laravelu
DB_USERNAME=root
DB_PASSWORD=''
  1. then restart your apache server/web server. and refresh your page and you have done

  2. If still issue try to run below command to clear the old configuration cache file

php artisan config:clear

OR

Please refer this link

Hope this solve your issue !

Please or to participate in this conversation.