From 9289c1b6c0674e48999df688f32cdf2c73995180 Mon Sep 17 00:00:00 2001 From: Michael Hopkins Date: Sat, 5 Nov 2016 06:42:19 -0600 Subject: [PATCH] Add solution to mysql connection issues Adding in a more "docker conventional" solution to the mysql connection issues --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 85f97e8..5afcbe3 100644 --- a/README.md +++ b/README.md @@ -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: -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 A + 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`