Hello Jan-Aage

In my example I have replaced the real username/password with a
"username"/"password". Iin the real code I use real username and password.
Actually early I thought the username and password I use are not correct, but
I log with them using mysql shell. I have grant all GRANTS to this user, but
it seems that it does not solve my problem. Anyway thanks for the answer.


Daniel Ducat

Jan-Aage Bruvoll wrote:

> On Wed, 14 Feb 2001, Daniel Ducat wrote:
> > Thanks for the answer, Jonathan. I have already tried the way you
> > propose, but it gives me the same error. Any other ideas ?
>
> > Lebrun Jonathan wrote:
> > > Try this :
> > > Connection C=DriverManager.getConnection(
> > >  "jdbc:mysql://localhost/test","username","password");
>
> Well, as far as I can see, you are trying to log on with the user
> 'username' and password 'password'. Unless you actually have a user in
> MySQL called 'username' with PW 'password', MySQL will complain just the
> way it did.
>
> > > > Cannot load connection class 'java.sql.SQLException: Invalid
> > > > authorization specification: Access denied for user:
> > > > 'username@localhost' (Using password: YES)'.:08001:0
>
> This is exactly what I mentioned above: MySQL denies access to the user
> 'username@localhost' (there is more about that in the manual, look for the
> part which describes how MySQL handles users, keyword: a user is always
> <user>@<somehost>).
>
> Hope this helps.
>
> Regards, Jan


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to