I added a db user with Plesk (7 reloaded) to a newly created database 'mvnforum'. PhpMyAdmin works fine. But when I try to connect to the database using the jsp script below:
<%@ page language="java" import="java.sql.*" %>
Connecting to database
<%
Class.forName("org.gjt.mm.mysql.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost.localdomain/mvnforum","mvnforum","forumtest");
%>
I get the error:
org.apache.jasper.JasperException: Invalid authorization specification: Access denied for user: 'mvnforum@localhost.localdomain' (Using password: YES)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
...
When I try to connect with the admin user (i.e. Plesk admin) using the same script, the connection is established. I doublechecked the password, it is correct.
Also, the privileges in mysql for the plesk user seem to be ok:
mysql> show grants for 'mvnforum'@'localhost.localdomain';
+----------------------------------------------------------------------------+
| Grants for mvnforum@localhost.localdomain |
+----------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON `mvnforum`.* TO 'mvnforum'@'localhost.localdomain' |
+----------------------------------------------------------------------------+
I'm running a dedicated Pentium 4 Red Hat Enterprise
Any suggestions?