title: Laravel 5.1 Error - PDOException:SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket
body: <p>I need your help for hosting a project Laravel online on a simple Gandi hosting.</p>
  
  <p>I work on Mac OS X with Mamp Pro and my website works like a charm on it.</p>
  
  <p>When I try to put my laravel project on Gandi hosting, i'm having trouble and I do not see where is the problem.</p>
  
  <p>Here's the problem I encounter  :</p>
  
  <p><a href="https://i.stack.imgur.com/FtkIe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FtkIe.png" alt="enter image description here"></a>
  I do not understand , I have changed the database.php file in the app folder to match the BDD MySQL Gandi and I have verified that my .env file is correct.</p>
  
  <p>Why my project tries absolutely to connect to a unix_socket MAMP then I am no longer in local ? Someone has already experienced the problem ?</p>
  
  <p>Thanks for your help !</p>