title: MySQL Error 111 Can't connect to server
body: <p>I have a connection.php file that is suppose to connect to a remote database.
  Here is the code:</p>
  
  <pre><code>&lt;?php
  try {
      $conn = new PDO('mysql:host=IP;port=PORT;dbname=DBNAME', 'USERNAME', 'PASSWORD');
  } catch (PDOException $e) {
      print "Error!: " . $e-&gt;getMessage() . "&lt;br/&gt;";
      die();
  } 
  ?&gt;
  </code></pre>
  
  <p>Now all my variables I believe are correct since I can connect to the database through <a href="http://www.quest.com/toad/%E2%80%8E" rel="nofollow" title="Toad">Toad</a>. I used this same PDO format for my own database connection through localhost and it works fine. I am not sure what the problem is. Since i can use <a href="http://www.quest.com/toad/%E2%80%8E" rel="nofollow" title="Toad">Toad</a> i believe that the server already allows remote access to it, but i am not sure on that. Any input would be nice.</p>
  
  <p>Also this is the Error that PDOException is coming back with:</p>
  
  <pre><code>SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'IP' (111)
  </code></pre>