今天把mysql升级到4.1后,程序连接数据库出错,于是打开admin校验数据源,果然不能连接,出错信息如下:
Connection verification failed for data source: mysql_bad java.sql.SQLException: Communication failure during handshake.Is there a server running on localhost:3306?
The root cause was that: java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
记得以前看过一篇blog,提到了解决办法,于是"赶紧的"
先到mysql.com下个最新的JDBC驱动,然后将下回来的压缩包里的"mysql-connector-java-3.1.6-bin.jar"
放到$CFMX_HOME/runtime/servers/lib/ (for CFMX Server Configuration )或者$JRUN_HOME/servers/lib/(for CFMX on JRun Configuration),比如我机器的是:C:\blackstone\runtime\lib
然后重起CFMX.
重新定义数据源,在"Driver"下拉框这项选择"other",接下来的配置如下图:
提交后数据源添加成功.
之所以升级到mysql4.1后数据源出错,是因为cfmx的jdbc驱动还是旧的.
相信MM在不久后会更新内置的JDBC驱动,不过在blackstone beta2里的是旧的.
Connection verification failed for data source: mysql_bad java.sql.SQLException: Communication failure during handshake.Is there a server running on localhost:3306?
The root cause was that: java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
记得以前看过一篇blog,提到了解决办法,于是"赶紧的"
先到mysql.com下个最新的JDBC驱动,然后将下回来的压缩包里的"mysql-connector-java-3.1.6-bin.jar"
放到$CFMX_HOME/runtime/servers/lib/ (for CFMX Server Configuration )或者$JRUN_HOME/servers/lib/(for CFMX on JRun Configuration),比如我机器的是:C:\blackstone\runtime\lib
然后重起CFMX.
重新定义数据源,在"Driver"下拉框这项选择"other",接下来的配置如下图:
提交后数据源添加成功.
之所以升级到mysql4.1后数据源出错,是因为cfmx的jdbc驱动还是旧的.
相信MM在不久后会更新内置的JDBC驱动,不过在blackstone beta2里的是旧的.