I have connected to my database successfully as I was able to do all of my beginning migrations, users table and password reset etc.
It is my first time running php artisan make:auth and when I go to register a new user for the laravel application, I get this error.
SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES) (SQL: select count(*) as aggregate from
users
where
Here is my .env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=larabiz
DB_USERNAME=root
DB_PASSWORD=
The answer was quite simple but weird.
run php artisan make:auth. then run php artisan migrate. shutdown your server, restart the server, and then register your first user. This worked for me, so Laravel was not able to add users during registration, without first restarting the server. That took me 5 fresh Laravel installs and three hours of work! I was in tears :).
grep -R homestead *
. Or check alldatabase.php
config files to see wherehomestead
may be hiding. – aynber