java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
来源:互联网 发布:能看日漫的漫画软件 编辑:程序博客网 时间:2024/05/07 00:57
环境:
MySQL 5.0 up through 5.0.16
Apache Tomcat/6.0.18
驱动:
mysql-connector-java-2.0.14.jar
症状:
信息: Server startup in 1281 ms
java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
at com.mysql.jdbc.MysqlIO.init(Unknown Source)
at com.mysql.jdbc.Connection.connectionInit(Unknown Source)
at com.mysql.jdbc.jdbc2.Connection.connectionInit(Unknown Source)
at com.mysql.jdbc.Driver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.mycompany.db.DBUtil.getConnection(DBUtil.java:15)
at com.mycompany.db.TestDb.doGet(TestDb.java:24)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
2008-12-25 13:39:22 org.apache.catalina.core.StandardWrapperValve invoke
解决方法:
把驱动换成
mysql-connector-java-3.1.11-bin.jar
MySQL 5.0 up through 5.0.16
Apache Tomcat/6.0.18
驱动:
mysql-connector-java-2.0.14.jar
症状:
信息: Server startup in 1281 ms
java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
at com.mysql.jdbc.MysqlIO.init(Unknown Source)
at com.mysql.jdbc.Connection.connectionInit(Unknown Source)
at com.mysql.jdbc.jdbc2.Connection.connectionInit(Unknown Source)
at com.mysql.jdbc.Driver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.mycompany.db.DBUtil.getConnection(DBUtil.java:15)
at com.mycompany.db.TestDb.doGet(TestDb.java:24)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
2008-12-25 13:39:22 org.apache.catalina.core.StandardWrapperValve invoke
解决方法:
把驱动换成
mysql-connector-java-3.1.11-bin.jar
- java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
- java.sql.SQLException: Communication failure during handshake. Is there a server running on localhos
- java web连接mysql异常Communication failure during handshake. Is there a server running on localhost
- Communication failure during handshake. Is there a server running on localhost:3306?
- Communication failure during handshake. Is there a server running on localhost:3306
- MySQL 连接问题java.sql.SQLException: Communication failure during handshak.
- Communication failure during handshake.JDBC连接MySql数据库问题
- FRM-92101: There was a failure in the Forms Server during startup.
- Server already running on localhost
- Caused by: java.sql.SQLException: The MySQL server is running with the --read-only option so it cann
- Is the server running on host “localhost” (::1) and accepting TCP/IP connections on port 5432?
- Jboss提示:Server already running on localhost
- A server is already running.
- Jboss Server Error:Server already running on localhost
- postgresql数据库无法连接,提示 Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP conn
- Error running Tomcat8: Address localhost:1099 is a
- Error running Tomcat8: Address localhost:1099 is a
- java.sql.SQLException: ResultSet is closed解决方法
- JavaScript中,String和StringBuffer性能PK
- 个人空间岁末大回报活动12月24日获奖名单
- 域管理的一些概念
- 域用户环境下的常用设置
- Welcome 2009!
- java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
- Oracle 数据库的SQL语句分页
- Network Programming in .NET 网络编程,有大量API
- Javascript小知识(取得QueryString即地址栏中参数)
- [C#]Enum枚举类型使用总结
- 宏观经济真是伪科学
- .NET Runtime Optimization Service解释
- Windows下return,exit和ExitProcess的区别和分析- -
- 微软的软件启动出奇的慢!