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 non of them solved the issue.
I also tried creating a new mysql user, but it returned another error:
SQLSTATE[HY000] [1698] Access denied
Any help would be appreciated!
My current env:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=user
DB_PASSWORD=password
I am able to go to 127.0.0.1:8000 after I run php artisan serve but I cannot access 127.0.0.1:3306 which is where I thought phpmyadmin was?
I have yet to change anything, but if there is any other piece of code I should share please lemme know!
Update
As mentioned by @brombeer the fact that I could not go to 127.0.0.1:3306 was because I did not have phpmyadmin installed.
I just got confused because I had been working on a lot of projects with a docker, and automatically assumed it had been already been installed on this device (docker sets up phpmyadmin automatically I think?)