gpt4 book ai didi

java - Centos mysql 连接器 java - JDBC 驱动程序

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:33:54 25 4
gpt4 key购买 nike

<分区>

我尝试在 centos 5 中运行这个 java.jar 文件,但我看到了这个错误。我用

安装了 java
yum install java 

但我认为 jdbc 没有安装,因为当我键入此命令时

yum install mysql-connector-java

我得到没有可用的包 mysql-connector-java。无事可做

当我运行这个命令来启动jar文件时

java -jar "/home/httpd/5plus.net/httpdocs/test/server/ChatServer.jar"

我看到了这条消息

[root@google ~]# java -jar "/home/httpd/5plus.net/httpdocs/test/server/ChatServer.jar"


-- Sat Apr 05 10:45:01 GMT 2014 --- Start Main Server ---
-- Sat Apr 05 10:45:01 GMT 2014 --- Can't register JDBC driver: org.gjt.mm.my sql.Driver, Exception: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver ---
-- Sat Apr 05 10:45:01 GMT 2014 --- Port 8090 Listen Start ---
-- Sat Apr 05 10:45:02 GMT 2014 --- Client Connected: Ip = 208.54.35.217 -- -
-- Sat Apr 05 10:45:03 GMT 2014 --- InputData From 208.54.35.217 useridx: 0 D ata: LOGIN$81 ---
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/plus?user=plus&password=plus123&characterEncoding=utf8
-- Sat Apr 05 10:45:03 GMT 2014 --- Can't create a new connection for jdbc:my sql://localhost/plus?user=plus&password=plus123&characterEncoding=utf8 ---

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com