Can you connect with a client like Sequel Pro, or whatever client you use. See also https://stackoverflow.com/questions/29395452/php-connection-failed-sqlstatehy000-2002-connection-refused
Can't Connect to BD after upgrading MAMP server from 4 to 5
i'm using MAMP 4.* on a macbook pro while building laravel 5.8 app, i have updated MAMP servier from 4 to 5 since then my laravel app couldn't connect to sql DB Correctly.
This is my .env file
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=mydb
DB_USERNAME=root
DB_PASSWORD=root
i'm getting this error
SQLSTATE[HY000] [2002] Connection refused
Ironically ??? i can connect o to my DB using the same settings from terminal like this
/Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot
After clearing the cache
php artisan config:clear
i'm still getting same error????
i'm struggling through this for a couple of days now i have noticed that my terminal prompt is showing different name that what i usually see
prompt
hassanmansoor@hassan-MBP ~ % // and the terminal window title is zsh which is totally new to me????
i'm not sure what is MBP ??? never seen this before ????
Don't anyone been in similar situation ???
Is there is any fix for this issue ????
Maybe read over the docs: https://documentation.mamp.info/en/MAMP-Mac/Preferences/Ports/
I'm thinking a port was still some how in use when up upgraded.
Please or to participate in this conversation.