当前位置: 代码迷 >> Java Web开发 >> Tomcat不能连接MYSQL解决方法
  详细解决方案

Tomcat不能连接MYSQL解决方法

热度:21   发布时间:2016-04-17 14:03:16.0
Tomcat不能连接MYSQL
我是菜鸟,安装好了MYSQL数据库,起动TOMCAT,显示以下错误的信息:
2007-6-14   18:41:23   org.logicalcobwebs.proxool.Prototyper   sweep
严重:   Prototype
java.sql.SQLException:   Unable   to   connect   to   any   hosts   due   to   exception:   java.net
.ConnectException:   Connection   refused:   connect

**   BEGIN   NESTED   EXCEPTION   **

java.net.ConnectException
MESSAGE:   Connection   refused:   connect

STACKTRACE:

java.net.ConnectException:   Connection   refused:   connect
                at   java.net.PlainSocketImpl.socketConnect(Native   Method)
                at   java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
                at   java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
                at   java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
                at   java.net.Socket.connect(Socket.java:452)
                at   java.net.Socket.connect(Socket.java:402)
                at   java.net.Socket. <init> (Socket.java:309)
                at   java.net.Socket. <init> (Socket.java:124)
                at   com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja
va:124)
                at   com.mysql.jdbc.MysqlIO. <init> (MysqlIO.java:225)
                at   com.mysql.jdbc.Connection.createNewIO(Connection.java:1783)
                at   com.mysql.jdbc.Connection. <init> (Connection.java:450)
                at   com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:411)
                at   java.sql.DriverManager.getConnection(DriverManager.java:512)
                at   java.sql.DriverManager.getConnection(DriverManager.java:140)
                at   org.logicalcobwebs.proxool.ProxyFactory.buildProxyConnection(ProxyFac
tory.java:41)
                at   org.logicalcobwebs.proxool.Prototyper.buildConnection(Prototyper.java
:150)
                at   org.logicalcobwebs.proxool.Prototyper.sweep(Prototyper.java:95)
                at   org.logicalcobwebs.proxool.PrototyperThread.run(PrototyperThread.java
:42)


**   END   NESTED   EXCEPTION   **


                at   com.mysql.jdbc.Connection.createNewIO(Connection.java:1851)
                at   com.mysql.jdbc.Connection. <init> (Connection.java:450)
                at   com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:411)
                at   java.sql.DriverManager.getConnection(DriverManager.java:512)
  相关解决方案