Hi all,
I'm trying to connect to MySql Server 5.0 using a java servlet, and it is coming up with the access denied error, which I think it is to do with the java code connection.
Class.forName("com.mysql.jdbc.Driver");
conn = DriverManager.getConnection("jdbc:mysql://localhost:8080/accounts" +
"user=admin&password=whatever");
When i run the servlet http://localhost:8080 and invoke submit it comes up with:
Access denied for user ''@'localhost' (using password: NO)
which makes me think that the username and password is not being sent correctly/error in the java code connection itself. The privileges etc have been set up on mysql:
GRANT ALL PRIVLEGES ON ACCOUNTS TO 'admin'@'localhost:8080' IDENTIFIED BY 'whatever';
The tomcat server resides on localhost on port 8080 and the dbse name is ACCOUNTS.