6 messages in com.mysql.lists.javaRe: localhost connection refused (non...
FromSent OnAttachments
Thomas Plümpe30 Oct 2004 09:51 
Rikard Froberg31 Oct 2004 08:51 
Thomas Plümpe31 Oct 2004 09:32 
jon gold01 Nov 2004 13:28 
Mark Matthews01 Nov 2004 14:32 
Thomas Plümpe02 Nov 2004 01:57 
Subject:Re: localhost connection refused (none of the usual causes, I believe)
From:Mark Matthews (ma@mysql.com)
Date:11/01/2004 02:32:25 PM
List:com.mysql.lists.java

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Thomas Plümpe wrote:

Hi,

I have a Java application (example in [1]) which runs perfectly on several hosts where I am using the URL jdbc:mysql://localhost:3306/networking?user=network_User&password=XXX to connect to the server.

Now I have setup the MySQL accounts on my newly installed SuSE server (MySQL 4.0.18, Connector/J 3.0.15-ga) just as I did on the other machines [2], but I am unable to connect (stack trace [3]) with the above URL.

After a bit of playing around I found that by changing "localhost" in the above URL to the real host name everything works nicely, I am just not getting why. Connecting via mysql -unetwork_User -p -h myserver.mydomain mysql -unetwork_User -p -h localhost works perfectly well. (I understand, though, that the latter connects via the UNIX pipe which Java is incapable of.)

It's not a skip-networking option -- I checked, and it wouldn't work at all if it was. It's not the /etc/hosts file as that correctly states "127.0.0.1 localhost". It's not a firewall as only one host is involved and I've tried with the firewall switched off.

I've switched on logging on the server and with "localhost" in the URL it doesn't even mention someone tried to connect.

Any ideas on how I could narrow this down further or fix it would be greatly appreciated,

Does this happen to be SuSE 9.2? If so, it's probably related to this bug:

http://bugs.mysql.com/?id=6348

-Mark

- -- Mark Matthews MySQL AB, Software Development Manager - Client Connectivity Office: +1 708 332 0507 www.mysql.com

See you at MySQL ComCon November 8-10! mysqlcomconeurope.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBhrmPtvXNTca6JD8RAgIQAJkBbQNqzAo9rHkfN55tO9K2l8+MUQCfYcmx y/nZ2qfXu1zP3ucN+QiQ+JM= =Xqh1 -----END PGP SIGNATURE-----