title: Warning: mysql_connect(): Access denied for user
body: <p>I am a beginner .
  I copied a simple php page on the server web <a href="http://www.barman-team.ir/tt.php" rel="nofollow">http://www.barman-team.ir/tt.php</a>
  and i import sql data base and make user &amp; and pass on data base (in cpanel)</p>
  
  <p>this page work on local host( xamp) but dont run on server</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;title&gt;Untitled Document&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body dir="rtl"&gt;
  
  &lt;?php
          $link=mysql_connect("localhost","uname","pass");
          mysql_select_db("barmante_ebram",$link);
          $q="SELECT * FROM site_sug";//
          $r=mysql_query($q,$link);
          $line= mysql_fetch_array($r);
          //while($line== $result-&gt;fetch_assoc()){
          echo $line['site_suggestion_id'].$line['site_suggestion']."&lt;br&gt;";       
          //echo $row["site_suggestion_id"].$row["site_suggestion_name"].$row["site_suggestion_date"].$row["site_suggestion"]."&lt;br&gt;";
          //}
      ?&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>error log is:</p>
  
  <pre><code>Warning: mysql_connect(): Access denied for user 'barmante_ebram_u'@'localhost' (using password: YES) in /home/barmante/public_html/tt.php on line 11
  
  Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/barmante/public_html/tt.php on line 12
  
  Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/barmante/public_html/tt.php on line 14
  
  Warning: mysql_fetch_array() expects parameter 1 to be resource, null given in /home/barmante/public_html/tt.php on line 15
  </code></pre>