have you tested accessing mysql from JDBC in isolation (write a simple test
class that
creates a connection and does a simple select)?

there might be a problem on you permissions setup under mysql.
http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Adm
inistration.html#Privilege_system

I had to remove the default user name="" from the table to get access.

-----Original Message-----
From: Januski, Ken [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 22, 2002 1:11 PM
To: Tomcat Users List
Subject: RE: JDBC realm problems


Half answering my own question I found that if I changed permissions to the
relevant user I was able to get a bit further. At least the logon is now
seen but it fails with this message:
"Invalid authorization specification: Access denied for user:
'ken;[EMAIL PROTECTED]' (Using password: NO)"
I have the feeling that this may also me an mySQL problem not a Tomcat one.
Still if anyone has any clues to the solution I'd appreciate hearing them.

Thanks,

Ken



-----Original Message-----
From: Januski, Ken [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 22, 2002 12:58 PM
To: Tomcat Users List
Subject: JDBC realm problems


Hi,

I've spent many hours last week and a few more today trying to get JDBC
security realm to work and keep stumbling on this error:
java.sql.SQLException: General error: Access denied for user:
'localhost.localdomain' to database 'tomcatusers';

I'm sure many people have problems getting this to work right off and I've
read a fair amount about various solutions. But what I can't figure out is
why the access denied error doesn't include a user name but only
localhost.localdomain. I've put user and password in server.xm; there is a
tomcatusers table with what i believe are the correct entries. In fact
they're copied/modified from the Goodwill book. I wouldn't be surprised by a
bad username or bad password error but this indicates that the user name
just isn't being passed along. Anyway I assume that I'll find the answer to
the authentication problem if I can find out why the user name doesn't seem
to be passed along to the database call.

Does anyone have any clues?

Thanks,

Ken



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to