title: PHP - connecting to mysql database from different server
body: <p>I'm trying to connect to a mysql database from a different server to the one the database is hosted on but I'm getting an error. </p>
  
  <p>I'm guessing it might be something to do with remote permissions. Is this something I can change or do I need to get my hosting company to do this?</p>
  
  <pre><code>&lt;?php
  $con = mysql_connect("mysql4-remote.hosting.net","myadmin","password123");
  if (!$con)
    {
    die('Could not connect: ' . mysql_error());
    }
  ?&gt;
  </code></pre>
  
  <p><code>Can't connect to MySQL server on 'mysql4-remote.hosting.net' (10060)PHP Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'mysql4-remote.hosting.net' (10060) in D:\websites\abc123\www\test.php on line 2</code></p>