Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JDBC-MYSQL- Access denied for user 'admin'@'localhost' (using password: YES

843859Nov 18 2008 — edited Nov 20 2014
I 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 16 2008
Added on Nov 18 2008
8 comments
1,519 views