Merge pull request #407 from michaeljhopkins/patch-2

Add solution to mysql connection issues
This commit is contained in:
Mahmoud Zalt 2016-11-05 18:52:53 -04:00 committed by GitHub
commit 3e4a5edc64
1 changed files with 5 additions and 2 deletions

View File

@ -1357,8 +1357,11 @@ Make sure the ports for the services that you are trying to run (80, 3306, etc.)
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: 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:
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. * Option A
2. Change the `DB_HOST` variable on env with the IP that you received from previous step. 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.
2. Change the `DB_HOST` variable on env with the IP that you received from previous step.
* Option B
1. Change the `DB_HOST` value to the same name as the mysql docker container. The Laradock docker-compose file currently has this as `mysql`