MySQL Lists are EOL. Please join:

List:MySQL and Java« Previous MessageNext Message »
From:Mark Matthews Date:December 10 2002 7:27pm
Subject:Re: java.sql.SQLException: Communication link failure:
View as plain text  
Hash: SHA1

Bill Harten wrote:
> When I try 
> getConnection("jdbc:mysql://
> =doe") 
> on a remote JDBC connection, I get:
>     java.sql.SQLException: Communication link failure:
> The user table contains a single entry for user='johndoe' host='%',
> password='...' and all privileges='Y'.
> The mysql client connects and works.  The JDBC URL host and socket are
> right; I get other messages when these are wrong, or when the network is
> down, or when mysqld is not running. I installed the latest of mysql on
> linux, and I'm running the latest mysql JDBC driver and java SDK 1.4.1
> on windows.

Please state _exactly_ what version of the JDBC driver you are using.

In almost all of the newsgroup postings, the 'Communication link 
failure' is due to idle connections not being closed, not the case when 
just making a connection. Most of these type of IOExceptions turn out to 
be flakey networks, or known issues with the JDK or the operating system 
or a combination of any of the three.

I will change the JDBC driver to include the stack trace of the 
IOException for easier debugging in the future, but in the mean time if 
you can run your code in a debugger and set a breakpoint for 
IOExceptions, to see exactly what exception your are getting, and 
exactly where it happens, that would help immensely.

The tough bit is debugging these issues, as they are not usually 
reproducible on other systems, so I need your help to figure out what's 
causing issues like this in your particular environment.


- -- 
MySQL 2003 Users Conference ->

For technical support contracts, visit

     __  ___     ___ ____  __
    /  |/  /_ __/ __/ __ \/ /  Mark Matthews <mark@stripped>
   / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
  /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla -


java.sql.SQLException: Communication link failure: Harten10 Dec
  • Re: java.sql.SQLException: Communication link failure: Matthews10 Dec