title: Access denied for user ''@'localhost' to database 'database'
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5991130/php-connecting-to-mysql-database-from-different-server">PHP - connecting to mysql database from different server</a>  </p>
  </blockquote>
  
  
  
  <pre><code>global $host, $username, $password, $database; 
  $host = "meshtelecom.com"; 
  $username = "mesh_project"; 
  $password = "password"; 
  $database = "mesh_database"; 
  $link = mysql_connect($host, $username, $password); 
  if(!$link)echo "Connection failed."; 
  $db = mysql_select_db($database)or die(mysql_error());  
  </code></pre>
  
  <p>I made a database with phpmyadmin in meshtelecom.com. I can't access this database from another server.. it's giving me:</p>
  
  <pre><code>Connection failed.Access denied for user ''@'localhost' to database 'mesh_database'
  </code></pre>