So, I am trying to create a laravel project from scratch.
I ran the following:
composer global require "laravel/installer=~1.1" //this code was not necessary
composer create-project laravel/laravel my-project-name
php artisan serve
Now I got the new laravel project ready to go, and tried to run:
php artisan migrate
but it returned an error:
SQLSTATE[HY000] [2002] Connection refused
I looked around other answers to similiar questions, but none of them solved the issue.
I also tried creating a new mysql user, but it returned another error:
SQLSTATE[HY000] [1698] Access denied
My current env:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=user
DB_PASSWORD=password