Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_jsp thread: java.sql.SQLException: General error: Access denied for user: '@l...'


Message #1 by "Michael Deegan" <mpdeegan@h...> on Tue, 18 Jun 2002 03:54:20
your database requires a username and password to connect to it? At the
moment, the user connecting to the database is blank according to that
error. Try providing a username...you never know it might work. I would be
very suprised if MySQL allows you to connect anonymously - the message
@localhost should be something more like chanoch@l... where chanoch is
the user name and I know that when you setup mysql it sets an admin password
by default, so maybe you could start with that.

chanoch

----- Original Message -----
From: "Michael Deegan" <mpdeegan@h...>
To: "Pro_JavaServer_Pages" <pro_jsp@p...>
Sent: Tuesday, June 18, 2002 3:54 AM
Subject: [pro_jsp] java.sql.SQLException: General error: Access denied for
user: '@l...'


> I am getting the following error ..
>
> ----- Root Cause -----
> java.sql.SQLException: General error: Access denied for user: '@l...'
> to database 'tourism_db'
>
> I am using Windows98 operating system.
>
> I kick off TOMCAT startup.bat file ( it in turn kicks off Catalina.bat )
> and then JAVA.exe.
>
> The first window (startup.bat) displays as following ...
>
> Using CATALINA_BASE: C:\jakarta-tomcat-4.0.3
> Using CATALINA_HOME: C:\jakarta-tomcat-4.0.3
> Using CLASSPATH:
> C:\jakarta-tomcat-4.0.\bin\bootstrap.jar;C:\jdk1.3.1_02\lib\tools.jar
> Using JAVA_HOME:     C:\jdk1.3.1_02
>
> The second window (JAVA) displays as following ...
>
>        at org.apache.catalina.core.ContainerBase.start
> (ContainerBase.java:1108)
>
>        at org.apache.catalina.core.StandardContext.start
> (StandardContext.java:3
> 345)
>        at org.apache.catalina.core.ContainerBase.start
> (ContainerBase.java:1123)
>
>        at org.apache.catalina.core.StandardHost.start
> (StandardHost.java:614)
>        at org.apache.catalina.core.ContainerBase.start
> (ContainerBase.java:1123)
>
>        at org.apache.catalina.core.StandardEngine.start
> (StandardEngine.java:343
> )
>        at org.apache.catalina.core.StandardService.start
> (StandardService.java:3
> 88)
>        at org.apache.catalina.core.StandardServer.start
> (StandardServer.java:506
> )
>        at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
>        at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
>        at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
>        at java.lang.reflect.Method.invoke(Native Method)
>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
> ----- Root Cause -----
> java.sql.SQLException: General error: Access denied for user: '@l...'
> to da
> tabase 'tourism_db'
>        at org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java:497)
>        at org.gjt.mm.mysql.Connection.connectionInit(Connection.java:264)
>        at org.gjt.mm.mysql.jdbc2.Connection.connectionInit
> (Connection.java:89)
>        at org.gjt.mm.mysql.Driver.connect(Driver.java:167)
>        at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:548)
>        at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:613)
>        at org.apache.catalina.core.ContainerBase.start
> (ContainerBase.java:1108)
>
>        at org.apache.catalina.core.StandardContext.start
> (StandardContext.java:3
> 345)
>        at org.apache.catalina.core.ContainerBase.start
> (ContainerBase.java:1123)
>
>        at org.apache.catalina.core.StandardHost.start
> (StandardHost.java:614)
>        at org.apache.catalina.core.ContainerBase.start
> (ContainerBase.java:1123)
>
>        at org.apache.catalina.core.StandardEngine.start
> (StandardEngine.java:343
> )
>        at org.apache.catalina.core.StandardService.start
> (StandardService.java:3
> 88)
>        at org.apache.catalina.core.StandardServer.start
> (StandardServer.java:506
> )
>        at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
>        at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
>        at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
>        at java.lang.reflect.Method.invoke(Native Method)
>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
>
>
> Only the last 50 lines will display - and this is after me fiddling to get
> 50 lines out. I cannot get the start of the error message to display and I
> can't scroll within the window.
>
> I assume the "root cause" of my error is as follows :
>
> ----- Root Cause -----
> java.sql.SQLException: General error: Access denied for user: '@l...'
> to da
> tabase 'tourism_db'
>
> I have editing my server.xml (in %CATALINA_HOME%/conf) ... is this
> correct ???
>
>        <Context path="/begjsp-tourism" docBase="begjsp-tourism" debug="0"
>                 reloadable="true">
>        <Realm   className="org.apache.catalina.realm.JDBCRealm" debug="99"
>                 driverName="org.gjt.mm.mysql.Driver"
>                 connectionURL="jdbc:mysql://localhost:3306/tourism_db"
>                 userTable="attraction" userNameCol="user_id"
>                 userCredCol="password" userRoleTable="user_role"
>                 roleNameCol="role_name" />
>        </Context>
>
>
> I have wasted days on this and cant seem to get any support ?
>
> Thanks in advance,
> Mike Deegan
>
> ----------------------------------------
> 161 McNab Cr, Regina SK, S4S 4B3, Canada
> + 1  xxx xxx xxxx   ( Cell )
> + 1  xxx xxx xxxx   ( Home )
> ----------------------------------------


  Return to Index