I spent the whole one and half day searching and playing with java/tomcat/mysql.
Java : 1.5
The problem is with mysql, the famous problem of:
Access denied for user: user@localhost (using password: yes)
The problem is with the new version of mysql 4.1, which uses a new mechanism
for authentication and storing passwords in the database. So due to this, the
old Java Connector/Driver is not compatible with the 4.1 and above.
So download the current version of the Java Driver here.
Uzip the driver. Unjar the driver again
and place the com and org folders in tomcat/common/classes.
Using the driver connection string: com.mysql.jdbc.Driver
Create users carefully using this link.
Dont forget to do the following after creating users: