急!!!jsp连接Mysql的问题:在线等

来源:百度知道 编辑:UC知道 时间:2024/06/08 05:30:40
连接Tomcat是出现如下错误提示:
ERROR - Cannot create PoolableConnectionFactory (Communication failure during handshake. Is there a server running on localhost:3306?)
WARN - Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communication failure during handshake. Is there a server running on localhost:3306?)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
at org.springframework.orm.hibernate3.LocalSes

Cannot create PoolableConnectionFactory (Communication failure during handshake. Is there a server running on localhost:3306?)

确认你的MYSQL在运行?且端口为3306?检查一下,重新连一次.或是更改一下口。