java.sql.SQLException: Communication failure during handshake. Is there a server running on localhos
来源:互联网 发布:显示器淘宝 编辑:程序博客网 时间:2024/05/19 19:58
错误如下:
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.foofy.org.DbConnection1.DbConn(DbConnection1.java:28) at com.authentication.org.SignUp1.doGet(SignUp1.java:56) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:404) at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:136) 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:127) 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:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Unknown Source)
解决思路:Driver classes are loaded successfully by JVM, The exact problem is that you are using latest mysql server but old version of mysql connecter jar.
Recommendation:
Go to download mysql connectro http://dev.mysql.com/downloads/connector/j/3.1.html/and download latest driver and put that to your WEB-INF/lib directory, restart the server
Good luck.
0 0
- java.sql.SQLException: Communication failure during handshake. Is there a server running on localhos
- java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
- 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.
- Caused by: java.sql.SQLException: The MySQL server is running with the --read-only option so it cann
- A server is already running.
- java.sql.SQLException: ResultSet is closed解决方法
- c3p0 java.sql.SQLException: Connection is invalid
- java.sql.SQLException: Connection is closed
- java.sql.SQLException: connection holder is null
- java.sql.SQLException: ResultSet is closed解决方法
- java.sql.SQLException: null, message from server: "Host 'xxx' is not allowed to connect
- java.sql.SQLException: null, message from server: "Host 'xxx' is not allowed to connect
- java.sql.SQLException: null, message from server: "Host 'xxx' is not allowed to connect
- 关联,聚合,组合的区别及C++实现
- 解决连接MySql速度慢的方法
- Android文件的上传
- SQLServer 不执行的条件分支却消耗时间!求解…
- /usr/local/bin/memcached: error while loading shared libraries: libevent-1.3.so.1: cannot open share
- java.sql.SQLException: Communication failure during handshake. Is there a server running on localhos
- ocp-v13-684
- 你这么努力,为何还如此焦虑?
- WPF 自定义图片剪切器 - 头像剪切(扩展与完善、实时截图)
- LoadRunner 11注意事项
- 阿里云web环境部署
- 制作网页1---AWS 云主机+万网域名+XAMPP 配置自己的网站
- LibRTMP源代码分析9:接收消息
- iOS可用内存限制