I've been trying to get data from my database in laravel 5.7.3, but it seems to be using the wrong database name, username and password as it returns this error:
SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES) (SQL: select * from `tasks`)
My .env file database section is also according to my needs and set like this:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=mrdb
DB_USERNAME=root
DB_PASSWORD=
PS: My app environment is still local. I can also migrate and put in data into database with artisan tinker without issues, but cannot just fetch data from the database.
The only way it gets to work is to change config/database.php mysql section to my parameters, which I believe it isn't just right.
Why is the .env not wanting the change when the database is called?