title: Access denied for user 'user_name'@'localhost' (using password: YES) in java
body: <p>I have installed MYSQL DataBase in my machine, and have java code to manipulate the data.</p>
  
  <p>Database credentials... 
  Database Name:ram
  username: "user_name" 
  password : "123".
  host is: localhost;</p>
  
  <p>I gave ALL PRIVILEGES to this "user_name" user (like create, update,delete nd etc..)</p>
  
  <p>Now i want to connect with Database we use the following method</p>
  
  <pre><code>DriverManager.getConnection("jdbc:MySql://localhost/ram","user_name","123");
  </code></pre>
  
  <p>Well its working correctly.</p>
  
  <p>Now i changed the user credentials as
  Host: 127.0.0.1</p>
  
  <p>and replace the connection syntax as <code>DriverManager.getConnection("jdbc:MySql://127.0.0.1/ram","Ramesh","123");
  </code></p>
  
  <p>Good,, its working fine ..
  Now i want to connect to DB with any host for this user.
  so i change the user details as 
  Host:%</p>
  
  <p>used the following method to connect with DB</p>
  
  <pre><code>DriverManager.getConnection("jdbc:MySql://127.0.0.1/ram","Ramesh","123");
  </code></pre>
  
  <p>but it gives an error like </p>
  
  <pre><code>Access denied for user 'Ramesh'@'localhost' (using password: YES)
  </code></pre>
  
  <p>I can't decide  this problem which belongs to either java code or DB code.</p>
  
  <p>Please let me out from this one guys...Thanks in advnce...</p>