title: cannot connect to mysql using mysqli in php script
body: <p>I am new to php. I am trying to connect to <code>SQLEXPRESS</code> server using <code>mysqli</code> from php script. Here is my code:</p>
  
  <pre><code>&lt;?php
  $servername = "localhost";
  
  // Create connection
  $conn = new mysqli($servername,"root","");
  
  // Check connection
  if ($conn-&gt;connect_error) {
      die("Connection failed: " . $conn-&gt;connect_error);
      } 
  echo "Connected successfully";
  
  ?&gt;
  </code></pre>
  
  <p>I get an error that the target machine actively refuses the connection. My server is listening connections on port 63083. When I enter the port number in $servername:</p>
  
  <pre><code> $servername = "localhost:63083";
  </code></pre>
  
  <p>then the script does not respond and after a few minutes I get an error that MySQL server has gone away. I would really appreciate some help in this regard.</p>
  
  <p>Thanks </p>