title: mysql_connect() always denies access
body: <p>I have phpMyAdmin running with MAMP, and I am finding it impossible to use mysql_connect().</p>
  
  <pre><code>$_db_connect = mysql_connect("root", "localhost");
  </code></pre>
  
  <p>Produces an error in php_error.log:  <code>mysql_connect() [&lt;a href='function.mysql-connect'&gt;function.mysql-connect&lt;/a&gt;]: Access denied for user</code> <code>'root'@'localhost' (using password: NO) in /....../common.lib.php on line 19</code></p>
  
  <p>I've checked out the privileges:</p>
  
  <pre><code>GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B' WITH GRANT OPTION
  </code></pre>
  
  <p>GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION</p>
  
  <p>and I am simply stumped.  I've created new users with passwords just to get the same result.  Strangely it always says (<code>using password: NO</code>), even when I attempt to connect as a user witha password:</p>
  
  <pre><code>$_db_connect = mysql_connect(MYSQL_HOST, MYSQL_USERNAME, MYSQL_PASSWORD);
  </code></pre>
  
  <p>Any advice is welcomed.  Thanks!</p>