title: mysql Access denied for user 'root'@'localhost' (using password: NO)
body: <p>I'm using Netbean 7.3, Glassfish 3.1.2</p>
  
  <p>I always get this error and I cannot proceed to do my project:</p>
  
  <p>WARNING: RAR5038:Unexpected exception while creating resource for pool mysql_tests_rootPool. Exception : javax.resource.spi.ResourceAllocationException: Connection could not be allocated because: Access denied for user 'root'@'localhost' (using password: NO)</p>
  
  <p>WARNING: RAR5117 : Failed to obtain/create connection from connection pool [ mysql_tests_rootPool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException: Connection could not be allocated because: Access denied for user 'root'@'localhost' (using password: NO)</p>
  
  <p>WARNING: RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: 
  Connection could not be allocated because: Access denied for user 'root'@'localhost' (using password: NO)]</p>
  
  <p>Error in getList() -->Error in allocating a connection. Cause: Connection could not be allocated because: Access denied for user 'root'@'localhost' (using password: NO)</p>
  
  <p>Initially my project cannot even run. But after including these 2 line of code under persistence.xml, my project can run, but it can only access the database once. </p>
  
  <pre><code>&lt;property name="eclipselink.jdbc.user" value="root"/&gt;
  &lt;property name="eclipselink.jdbc.password" value="password"/&gt;
  </code></pre>
  
  <p>I included "root" and "password" when doing all the setup etc but still, I'm getting this error. Tried a lot of methods but none works!</p>
  
  <p>Please help!
  Thanks!!</p>