I'm trying to connect to a mysql database using an applikation written in java on a apache server. I'm using the org.gjt.mm.mysql driver and I'm compiling under 1.1.4 but executing under 1.2.2
I constantly get this error message when running the app:
java.sql.SQLException: Server configuration denies access to data source

the code looks like:
try
{
Connection con = DriverManager.getConnection ("jdbc:mysql://localhost/db2?user=USERNAME?password=PASS");
//sql querys
catch(SQLException slut)

But I can connect to the database db2 using
mysql -u USERNAME -pPASS db2

So why do mysql denies access to the aplikation but not when I'm connecting from the prompt?

//Fred