title: PHP - mysql connection timeout delay
body: <p>We're testing a php connection to a mysql DB using the following syntax:</p>
  
  <pre><code>&lt;?php
  $link = mysqli_connect("10.0.0.6:3306", "wordpress-user", "Passw0rd", "wordpress");
  
  if (!$link) {
      echo "Error: Unable to connect to MySQL." . PHP_EOL;
      echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL;
      echo "Debugging error: " . mysqli_connect_error() . PHP_EOL;
      exit;
  }
  
  echo "Success: A proper connection to MySQL was made! The my_db database is great." . PHP_EOL;
  echo "Host information: " . mysqli_get_host_info($link) . PHP_EOL;
  
  mysqli_close($link);
  ?&gt;
  </code></pre>
  
  <p>The issue is that on success the response is immediate, however, on failure, the response is always 22 seconds. Would it be possible to reduce the 22 seconds to a quicker response on connection failure?</p>
  
  <p>We've already reduced the mysql.connect_timeout to 5 seconds, however this had no effect as timeout / response was still 21 seconds. Any ideas please?</p>
  
  <p>The PHP server is hosted on IIS.</p>
  
  <p>Thanks in advance.</p>