great, thanx.... couldn't quite get the grants changed right, so I found
that 127.0.0.1 worked fine.

-gratzie
 ryan


----- Original Message -----
From: "Martin Jacobson" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, September 25, 2002 1:34 AM
Subject: Re: JDBC problem


> Ryan wrote:
>
> > Thank you, this worked!
> > However, now, the next line of code gives me problems:
> > Connection C = DriverManager.getConnection("jdbc:mysql://localhost/tob",
> > "user", "pass");
> >
> > Gives me the error :
> > javax.servlet.ServletException: Invalid authorization specification:
Access
> > denied for user: '[EMAIL PROTECTED]' (Using password: YES)
> >
> > When I run mysql --user=user -p
> > with the same user/pass as in the getConnection() method, everything
works
> > fine.
> >
> > -thanx, ryan
> >
> >
>
>
> I had the same problem. The point is that tomcat passes "the45.dhs.org"
> as the host name, and NOT localhost. Therefore, you have to GRANT
> privileges to the user on this host in MySQL for the connection to work.
>
> HTH,
> Martin
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to