LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 656|回复: 6

关于jdbc,我实在是不知道f怎么回事,大虾们帮我看看

[复制链接]
发表于 2005-3-28 22:46:56 | 显示全部楼层 |阅读模式
Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: null,  message from server: "#HY000Host 'localhost.localdomain' is not allowed to connect to this MySQL server"
        org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
        org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
        org.apache.jsp.mysqltest1_jsp._jspService(mysqltest1_jsp.java:57)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

java.sql.SQLException: null,  message from server: "#HY000Host 'localhost.localdomain' is not allowed to connect to this MySQL server"
        com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:970)
        com.mysql.jdbc.Connection.createNewIO(Connection.java:1768)
        com.mysql.jdbc.Connection.<init>(Connection.java:430)
        com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:268)
        java.sql.DriverManager.getConnection(DriverManager.java:512)
        java.sql.DriverManager.getConnection(DriverManager.java:193)
        org.apache.jsp.mysqltest1_jsp._jspService(mysqltest1_jsp.java:48)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.

linux+mysql+jsp,这个是哪里错了
先谢谢了
发表于 2005-3-28 23:03:03 | 显示全部楼层
似乎是权限的问题。。不让连接到mysql server。。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-3-28 23:33:42 | 显示全部楼层
这个问题怎么解决,我的mysql是默认安装的
回复 支持 反对

使用道具 举报

发表于 2005-3-29 08:37:23 | 显示全部楼层
检查你的 mysql 中 mysql.user 表的用户权限
回复 支持 反对

使用道具 举报

发表于 2005-3-29 09:13:08 | 显示全部楼层

re

先用root连接试试
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-3-29 16:34:01 | 显示全部楼层
我一直事在用root用户
回复 支持 反对

使用道具 举报

发表于 2005-3-30 09:11:11 | 显示全部楼层

re

UPDATE db SET host=('%')  WHERE user='root'
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表