500 Servlet Exception
java.lang.Exception: ExeQuery():Invalid authorization specification: Access
denied for user: '[email protected]' (Using password: YES)
at myshop.DBconn.ExeQuery(DBconn.java:41)
at myshop.news_sys.ManagerNews.ReXun(ManagerNews.java:328)
at _myshop._index__jsp._jspService(E:\tools\resin\doc\myshop\index.jsp:32)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.subservice(Page.java:497)
at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182)
at com.caucho.server.http.Invocation.service(Invocation.java:312)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:244)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
at java.lang.Thread.run(Thread.java:536)打开网页的时候出现这个错误。程序使用jsp+javabean+mysql做的,用resin做服务器,能告诉我resin和mysql的具体配置吗?我是新手,多谢指教!可以的话加我qq,再向你请教,qq:4287725。再次多谢!

解决方案 »

  1.   

    vi /usr/local/resin/conf/resin.conf  <resource-ref>
      <res-ref-name>jdbc/yesgo</res-ref-name>    //数据源名称
      <res-type>javax.sql.DataSource</res-type>   //数据源类型
      <init-param driver-name="org.gjt.mm.mysql.Driver"/>  //数据库驱动
      <init-param url=" jdbc:mysql://localhost/yesgo "/>  //连接串
      <init-param user="your_user_name"/>      //用户名
      <init-param password="your_password"/>    //密码
      <init-param max-connections="20"/>      //最大连接数
      <init-param max-idle-time="30"/>       //延时时间
      </resource-ref>
      

  2.   

    你的MySQL数据库的用户名leo,可能是密码错误或是无权访问你的数据库。
      

  3.   

    在MySQL中增加新用户。 格式:grant select on 数据库.* to 用户名@登录主机 identified by "密码" 
    例1、增加一个用户test1密码为abc,让他可以在任何主机上登录,并对所有数据库有查询、插入、修改、删除的权限。首先用以root用户连入MYSQL,然后键入以下命令: 
    grant select,insert,update,delete on *.* to test1@"%" Identified by "abc"; 
    但例1增加的用户是十分危险的,你想如某个人知道test1的密码,那么他就可以在internet上的任何一台电脑上登录你的mysql数据库并对你的数据可以为所欲为了,解决办法见例2。 例2、增加一个用户test2密码为abc,让他只可以在localhost上登录,并可以对数据库mydb进行查询、插入、修改、删除的操作(localhost指本地主机,即MYSQL数据库所在的那台主机),这样用户即使用知道test2的密码,他也无法从internet上直接访问数据库,只能通过MYSQL主机上的web页来访问了。 
    grant select,insert,update,delete on mydb.* to test2@localhost identified by "abc"; 
    如果你不想test2有密码,可以再打一个命令将密码消掉。 
    grant select,insert,update,delete on mydb.* to test2@localhost identified by "";
      

  4.   

    对,主要是Mysql的用户没有配置好,用楼上的方法配置就行了。