title: Laravel connection timeout when connecting to database
body: <p>I am moving an application from my development machine to a test server. When connecting to my local development mysql database everything works as expected. When attempting to connect to our test server, the requests time out after 45 seconds and a 500 error is returned.</p>
  
  <p>I tested that the servers can communicate and php can get results by using the basic mysqli php functionality, and results are returned as expected:</p>
  
  <pre><code>// Create connection
  $conn = new mysqli($servername, $username, $password, $dbname);
  // Check connection
  if ($conn-&gt;connect_error) {
      die("Connection failed: " . $conn-&gt;connect_error);
  } 
  
  $sql = "SELECT * FROM users";
  $result = $conn-&gt;query($sql);
  
  if ($result-&gt;num_rows &gt; 0) {
      // output data of each row
      while($row = $result-&gt;fetch_assoc()) {
          echo var_export($row, true);
      }
  } else {
      echo "0 results";
  }
  $conn-&gt;close();
  </code></pre>
  
  <p>The following both fail and hit timeout limits in laravel:</p>
  
  <pre><code>$users = DB::table('users')-&gt;get();
  
  $users = User::all();
  </code></pre>
  
  <p>Thoughts? Ideas? Opinions?</p>