linux下jsp与mysql连接出现问题!!!!!急急急!在线等待!!

nmgclm626 2003-05-28 05:18:56
错误提示
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 jdbc已经安装!!!!!!!!!!
...全文
33 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
mty 2003-06-13
  • 打赏
  • 举报
回复
1. confirm the "Class.forName("org.gjt.mm.mysql.Driver").newInstance();" can be execute successfully, // use try & catch,
2. if error, there is no JDBC-DRIVER found. download and copy MySql's JDBC driver into TOMCATHOME\common\lib
3. if success, Test your DBServer, for examples: telnet localhost 3306, if can be succussful, your SqlServer is excuting.
4. then you'd create a database and user for your test
5. ok
nmgclm626 2003-05-29
  • 打赏
  • 举报
回复
up
nmgclm626 2003-05-28
  • 打赏
  • 举报
回复
up
nmgclm626 2003-05-28
  • 打赏
  • 举报
回复
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
String url ="jdbc:mysql://localhost/mysql?user=root&password=";

Connection conn= DriverManager.getConnection(url);
Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
String sql="select * from test";
zeeler 2003-05-28
  • 打赏
  • 举报
回复
贴出你的连接数据库的部分代码
nmgclm626 2003-05-28
  • 打赏
  • 举报
回复
现在又出现最初的错误提示了。请大家帮帮忙!!!!!!!!
nmgclm626 2003-05-28
  • 打赏
  • 举报
回复
能够正常操作
phoenxizhang 2003-05-28
  • 打赏
  • 举报
回复
同意zeeler,try
zeeler 2003-05-28
  • 打赏
  • 举报
回复
你不用程序,直接操作MySQL数据库正常吗?能登陆并且查看里面的表吗?
wangyanqiu 2003-05-28
  • 打赏
  • 举报
回复
linux下还每怎么玩过!

期待!
nmgclm626 2003-05-28
  • 打赏
  • 举报
回复
将localhost改为ip地址后提示
Server configuration denies access to data source
怎么办?????????????
nmgclm626 2003-05-28
  • 打赏
  • 举报
回复
ps 能够检测到服务进程 mysqld_safe
匪六哥 2003-05-28
  • 打赏
  • 举报
回复
你的mysql的服务开着了吗?检查一下!

81,115

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧