JDBC-MYSQL- Access denied for user 'admin'@'localhost' (using password: YES
843859Nov 18 2008 — edited Nov 20 2014I am new to MYSQL.I have coded a simple jdbc program in java to establish a connection with mysql DB.When i run this program it throws an error like
Error while connecting to databasejava.sql.SQLException: Access denied for user 'admin'@'localhost' (using password: YES)
With this i knew that we should have been granted to access all db in mysql,so i have used this command
mysql>grant all on prasad.* to admin@localhost;
here admin is password and localhost is my machine ip address.
Even i did like this , i am getting same error.Please help in this as soon as possible.Am i doing any wrong..?
Your help would be appreciated.