Skip to content

Commit 89fac4b

Browse files
authored
Merge pull request laradock#371 from imamassi/master
Quick steps to resolve connection refused error
2 parents 15892db + 22a3bbc commit 89fac4b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,6 +1221,12 @@ Make sure the ports for the services that you are trying to run (80, 3306, etc.)
12211221
3. Enter your windows username and password.
12221222
4. Go to the `reset` tab and click restart docker.
12231223

1224+
#### I get Mysql connection refused
1225+
1226+
This error is sometimes happens because your Laravel application isn't running on the container localhost IP (Which is 127.0.0.1). Steps to fix it:
1227+
1228+
1. Check your running Laravel application IP by dumping `Request::ip()` variable using `dd(Request::ip())` anywhere on your application. The result is the IP of your Laravel container.
1229+
2. Change the `DB_HOST` variable on env with the IP that you received from previous step.
12241230

12251231

12261232

0 commit comments

Comments
 (0)