描述:
Tomcat下,连接mysql。抛出:
Cannot connect to MySQL server on localhost:3306 Is there a MySQL server running on the machine/port you are trying to connect to? (java.lang.NumberFormatException)
数据库:mysql-4.1.14.max
平台:Linux9.0
驱动:mysql-connector-java-3.1.10-bin.jar
诊断:
Tomcat下,连接mysql。抛出:
Cannot connect to MySQL server on localhost:3306 Is there a MySQL server running on the machine/port you are trying to connect to? (java.lang.NumberFormatException)
数据库:mysql-4.1.14.max
平台:Linux9.0
驱动:mysql-connector-java-3.1.10-bin.jar
诊断:
在WEB-INF/lib下有老版本的connector,删掉它,连接正常。
本文转自 cuiyingfeng 51CTO博客,原文链接:http://blog.51cto.com/cuiyingfeng/6661,如需转载请自行联系原作者