I have installed Laravel 5 successfully and changed MySQL credentials in database.php file in config directory to \'
mysql\' => [
\'driver\'
in my case I wanted to connect to the database installed on windows that i used to access through workbench, so i replaced localhost with the ip address which i obtained by typing ipconfig
on windows command prompt
I was facing the same issue. Everything was fine but in
bootstrap/cache/config.php
always had the incomplete password. Upon digging further, realized that the password had '#' character in it and that was getting dropped. As '#' is used to mark a line as a comment.
if you before use localhost and root your file be cached
remove /bootstap/cache/config.php
Open terminal on XAMPP > go to /opt/lampp/htdocs/project_name
> run php artisan migrate
.env file
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=8080
DB_DATABASE=database_name
DB_USERNAME=root
DB_PASSWORD=
I spent hours on this :-( and finally, it was really easy to hack
BEFORE
DB_PASSWORD=#Root2020$
UPDATED
DB_PASSWORD="#Root2020$"
I think the problem was # in the password, that's why I had to write my password into quotation marks.
In my case, it was actually root user permission problem. My Laravel
configurations were all perfect, but later I found that it was root user permission problem since my MySQL configs were somehow changed.
skip-grant-tables
in following place:[mysqld] skip-grant-tables port=3306
and it worked.