Thursday, February 3, 2022

[FIXED] laravel .env folder's db config, hosting it on mamp

Issue

I just wanted to check is there some Username and Password in my MAMP account that I must add to .env file

more exactly what should this part in .env be, when using MAMP

DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel_db
DB_USERNAME=root
DB_PASSWORD=

when hosting my server is being hosted at localhost/8888 maybe I should change DB_HOST from 127.0.0.1 to localhost/8888?

and what to do with Username and Password?


Solution

DB_HOST must an IP or a hostname and it's not related to a folder. Just input user name and password that you created. Usually default username and password for MAMP is root.



Answered By - Muhammad Dyas Yaskur

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.