title: java mysql connection link failure Connection refused
body: <p>when the client connectin to mySql server ,throw below exception </p>
  
  <pre><code>Last packet sent to the server was 0 ms ago.
          at sun.reflect.GeneratedConstructorAccessor112.newInstance(Unknown Source)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
          at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
          at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
          at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2103)
          at com.mysql.jdbc.ConnectionImpl.&lt;init&gt;(ConnectionImpl.java:718)
          at com.mysql.jdbc.JDBC4Connection.&lt;init&gt;(JDBC4Connection.java:46)
          at sun.reflect.GeneratedConstructorAccessor110.newInstance(Unknown Source)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
          at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
          at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
          at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
          at java.sql.DriverManager.getConnection(DriverManager.java:582)
          at java.sql.DriverManager.getConnection(DriverManager.java:154)
          at org.logicalcobwebs.proxool.DefaultConnectionBuilder.buildConnection(DefaultConnectionBuilder.java:39)
          at org.logicalcobwebs.proxool.Prototyper.buildConnection(Prototyper.java:159)
          at org.logicalcobwebs.proxool.ConnectionPool.getConnection(ConnectionPool.java:211)
          at org.logicalcobwebs.proxool.ProxoolDriver.connect(ProxoolDriver.java:89)
          at java.sql.DriverManager.getConnection(DriverManager.java:582)
          at java.sql.DriverManager.getConnection(DriverManager.java:207)
          at com.chinaren.tools.MysqlConnectionPools.getConnection(MysqlConnectionPools.java:652)
          ..........
  Caused by: java.net.ConnectException: Connection refused
          at java.net.PlainSocketImpl.socketConnect(Native Method)
          at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
          at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
          at java.net.Socket.connect(Socket.java:525)
          at java.net.Socket.connect(Socket.java:475)
          at java.net.Socket.&lt;init&gt;(Socket.java:372)
          at java.net.Socket.&lt;init&gt;(Socket.java:215)
          at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:253)
          at com.mysql.jdbc.MysqlIO.&lt;init&gt;(MysqlIO.java:280)
          at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2026)
          ... 51 more
  </code></pre>
  
  <p>1: the client can ping dbServer is ok <br/>
  2: the client can telnet dbServer:port is ok</p>
  
  <p>The same code  on my computer connection to dbServer is ok 
  </p>
  
  <p>is the 8 hours problem?</p>
  
  <p>so what's the cause ?</p>