title: Illuminate\Database\QueryException: SQLSTATE[HY000] [2002] in file Illuminate/Database/Connection.php on line 678
body: <p>I have Laravel installed on Mac using docker. I connecting to it with postman</p>
  <p>The method ge returns this error:</p>
  <pre><code>Illuminate\Database\QueryException: SQLSTATE[HY000] [2002] Connection refused (SQL: select * from `flights`) in file /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 678       
  
      #0 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(752): Illuminate\Database\Connection-&amp;gt;runQueryCallback()
          #1 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(732): Illuminate\Database\Connection-&amp;gt;tryAgainIfCausedByLostConnection()
          #2 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(641): Illuminate\Database\Connection-&amp;gt;handleQueryException()
          #3 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(346): Illuminate\Database\Connection-&amp;gt;run()
          #4 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2313): Illuminate\Database\Connection-&amp;gt;select()
          #5 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2301): Illuminate\Database\Query\Builder-&amp;gt;runSelect()
          #6 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2796): Illuminate\Database\Query\Builder-&amp;gt;Illuminate\Database\Query\{closure}()
  </code></pre>