On Thursday 17 October 2002 05:36, Bill Leath wrote:
> I am trying to use mysql.
>
> I use the line
>
> mysql -u username -p
> and then enter the correct password
>
> The error message I get is  error 1045 access denied for user:
> username@localhost (Using password: YES)
>
> I know that I am using the correct username and password, because an
> application using jdbc uses the same username and password and can
> login.

mysql probably tries to use UNIX sockets, while the JDBC app uses TCP/IP 
sockets, and you have the former not valid for connections.

try 
mysql -h localhost -u niclas -p

and if that doesn't work, you probably only have the FQDN as the hostname in 
the database, so

mysql -h niclas.hedhman.org -u niclas -p

Either one should do it.

Also, does the JDBC app run from the same host/IP as the mysql client? If not, 
then you may have "client host" connection limits.

Niclas

---------------------------------------------------------------------
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