title: php - cannot connect to database. Access denied for user 'UserName'@'%' to database 'table'
body: <p>I can't seem to access the database to my host's server.  Here's the code that I use to connect to it:</p>
  
  <pre><code>$servHost = 'fdb7.biz.nf';
  $servPort = '3306';
  $servName = '1598934_user';
  $servPass = '**********';
  $dataTable = 'table';
  
  $connect = @mysql_connect($servHost.':'.$servPort, $servName, $servPass);
  
  $db = @mysql_select_db($dataTable);
  
  if(!$connect || !$db){
      die(mysql_error());
  }else{
      echo 'connected';
  }
  </code></pre>
  
  <p>When I try to use this I get the error:</p>
  
  <pre><code>Access denied for user '1598934_user'@'%' to database 'table'
  </code></pre>
  
  <p>I assume it has something to do with the <code>%</code> sign, but I don't know what to replace it with or how. The server is not mine, I'm using biz.nf to host my site.  Any advice appreciated.</p>