Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

unable to connect tomcat with mysql

  Asked By: Lucas    Date: Sep 28    Category: Java    Views: 1070

Iam new to jsp iam suing tomcat5.x ,mysql5.x and j/connector 3.x,The
problem is when i try to connect tomcat with mysql using j/connector
tomcat throws error as access denied unable to connect using password
Yes at users@localhost



3 Answers Found

Answer #1    Answered By: Zoar Mizrachi     Answered On: Sep 28

AFAIK in mysql  4.x is was like this:

mysql> grant all on [db].* to [user]@[machine] identified by "[password]";
mysql> flush privileges;

Notes :
1) Be aware of hostnames. If you resolve with both hostname and
host.domain, try to add both of them to the grant list.

2) You can use wildcard (%) for machine IP/domain. (e.g. %.mydomain,
192.168.0.%). In this case, bound hosts with '"'.

2) replace '*' with an specific tables(s) if you like.

3) replace 'all' with other permissions like read, write, etc if you like.

4) If you wanna see the list of all ready given grants, connect  to 'mysql'
db, add "SELECT * FROM db"( or it was "users" ?:)

5) Check MySQL port. Is it open?

6) Not so sure about MySQL 5.0. Maybe you need to get latest driver.

Answer #2    Answered By: Eileen Carr     Answered On: Sep 28

this error  maybe from u'r ACCESS Denid to mysql...
u should :
1- check u'r password again!
2- give a grant to the user@localhost and try again!

Answer #3    Answered By: Phoebe Brown     Answered On: Sep 28

To solve your problem
1- goto:
2- look for "jmaster_" on the page and read my post about your problem.

Didn't find what you were looking for? Find more on unable to connect tomcat with mysql Or get search suggestion and latest updates.