我的Jdon安装第三步出错解决

本文介绍了解决Jdon论坛(基于Jive论坛2.1版本修改)在安装过程中遇到的数据库连接失败问题的具体步骤。通过更换更高版本的JDBC驱动程序,成功解决了与MySQL数据库的连接问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

因为jive论坛是个很有名开放源代码的论坛,从2.1版本以后开始收费所以我尝试jive论坛的修改版jdon
但是安装到第三步出错,试了很多便,依然如此。

出错提示:“[color=red]打开日志文件"jiveHome\logs\DefaultConnectionProvider.log[/color]" 查看错误信息然后返回修正”
日至信息:[color=red]Starting ConnectionPool:
dbDriver = org.gjt.mm.mysql.Driver
dbServer = jdbc:mysql://localhost/Jive
dbLogin = root
log file=F:\Tomcat\webapps\jive\WEBINF\jiveHome\logs\DefaultConnectionProvider.log
minconnections = 5
maxconnections = 20
Total refresh interval = 0.8 days
-----------------------------------------
--->Attempt (1 of 5) failed to create new connections set at startup:
java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
Will try again in 10 seconds...
--->Attempt (2 of 5) failed to create new connections set at startup:
java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
Will try again in 10 seconds...
--->Attempt (3 of 5) failed to create new connections set at startup:
java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
Will try again in 10 seconds...
--->Attempt (4 of 5) failed to create new connections set at startup:
java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
Will try again in 10 seconds...
All attempts at connecting to Database exhausted[/color]


然后在Google里搜索 打开日志文件"[color=red]jiveHome\logs\DefaultConnectionProvider.log[/color]
或者[color=red]Communication failure during handshake. Is there a server running on localhost:3306[/color]
就会出现很多出现这样问题的帖子,但是找了半天没有找到答案,于是从图书馆借了本关于JSP的书,看了其中的JDBC后今天终于搞定,现在把具体步骤说明,从网上查之有很多原因,但是我只说明我的原因,因为我是个菜鸟,心有余力不足

我用的版本因该是Jdon(从jive2.1改编) Tomcat 5.5 MySQL5.0

从书上和网上得知,最有可能是数据库驱动JDBC版本太低,于是我在MySQL官方下载了一个5.0的JDBC驱动
因为我的MySQL数据库是5.0的
Jdon自带的是[color=red]mm.mysql-2.0.14-bin.jar[/color]驱动
网址:http://dev.mysql.com/downloads/connector/j/5.1.html
http://mysql.mirrors.arminco.com/Downloads/Connector-J/mysql-connector-java-5.0.8.zip
下载后解压把[color=red]mysql-connector-java-5.0.8-bin.jar[/color]复制到 Tomcat下的common\lib文件夹下
我的是:D:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib
用户只需要将JDBC驱动复制到CLASSPATH所指向的一个目录下就可以使用了,这和普通的JAVA类库的使用没有任何区别,因为要把Tomcat的common\lib加入CLASSPATH环境变量里面,所以把
mysql-connector-java-5.0.8-bin.jar拷贝到Tomcat的common\lib下


Jdon安装说明为:

Tomcat配置,Tomcat使用4.01以上,如果你使用mysql,请使用lib目录下的mm.mysql-2.0.14-bin.jar
作为JDBC驱动程序,将之拷贝到tomcat/common/lib下。重启Tomcat.
安装第三步 设置数据库
如果是 mysql driver=org.gjt.mm.mysql.Driver
serverURL=jdbc:mysql://localhost/jive
username=访问数据库用户名
password=密码

修改:

[color=red]Tomcat配置,Tomcat使用4.01以上,如果你使用mysql,请使用lib目录下的mysql-connector-java-5.0.8.zip
作为JDBC驱动程序,将之拷贝到tomcat/common/lib下。重启Tomcat.
安装第三步 设置数据库
如果是 mysql driver=com.mysql.jdbc.Driver
serverURL=jdbc:mysql://localhost/jive
username=访问数据库用户名
password=密码[/color]

然后在浏览器里输入http://localhost:8080/jive/admin/setup/ 设置


安装成功后的日至:
Starting ConnectionPool:
dbDriver = com.mysql.jdbc.Driver
dbServer = jdbc:mysql://localhost/jive
dbLogin = root
log file = D:\jspsourse\jive\WEB-INF\jiveHome\logs\DefaultConnectionProvider.log
minconnections = 3
maxconnections = 10
Total refresh interval = 0.5 days
-----------------------------------------
Fri Nov 23 19:47:40 CST 2007 Opening connection 0 com.mysql.jdbc.Connection@107f45d:
Fri Nov 23 19:47:40 CST 2007 Opening connection 1 com.mysql.jdbc.Connection@29ce8c:
Fri Nov 23 19:47:41 CST 2007 Opening connection 2 com.mysql.jdbc.Connection@1094d48:


如果有什么地方写错或者疏漏请大家指教
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值