You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tim Trainor <ti...@tcp.net.au> on 2001/12/09 06:07:06 UTC
Problems connecting to mysql
Dear all,
I've been tearing my hair out trying to get this thing to work for the
last couple of days and I fear there is no alternative other than to bug
you list gurus for some help: Here goes....
I have Tomcat 4.0.1 installed and it's examples run.
I have mysql 3.23.46 installed and it is running fine with the necessary
grants etc.
In my server.xml I have the following section which should establish the
connection to the database:
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost/universe?user=snike;password=blahdy"
userTable="users" userNameCol="user_name"
userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
But when I fire up tomcat using the startup.sh script, the following
error comes up. This error is extra-weird because we have another
machine here with an identical setup and identical entries in server.xml.
Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
Catalina.start: LifecycleException: Exception opening database
connection: java.sql.SQLException: Invalid authorization specification:
Access denied for user: 'snike;password@192.168.0.27' (Using password:
NO)
LifecycleException: Exception opening database connection:
java.sql.SQLException: Invalid authorization specification: Access
denied for user: 'snike;password@192.168.0.27' (Using password: NO)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
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: Invalid authorization specification: Access
denied for user: 'snike;password@192.168.0.27' (Using password: NO)
at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java:330)
at
org.gjt.mm.mysql.Connection.connectionInit(Connection.java:261)
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.StandardEngine.start(StandardEngine.java:307)
at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
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)
=====================
The 192.168.0.27 is the ip address of this machine.
Any and all help would be appreciated!
tia
Tim T.
-------
And now for the funny sign-off:
"Isn't it sad that a family can be torn apart by something as simple as
a pack of wild dogs"
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Re: Problems connecting to mysql
Posted by Paul DuBois <pa...@snake.net>.
>At 4:07 PM +1100 12/9/01, Tim Trainor wrote:
>>Dear all,
>>
>>I've been tearing my hair out trying to get this thing to work for
>>the last couple of days and I fear there is no alternative other
>>than to bug you list gurus for some help: Here goes....
>>
>>I have Tomcat 4.0.1 installed and it's examples run.
>>I have mysql 3.23.46 installed and it is running fine with the
>>necessary grants etc.
>>
>>In my server.xml I have the following section which should
>>establish the connection to the database:
>>
>> <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
>> driverName="org.gjt.mm.mysql.Driver"
>>
>>connectionURL="jdbc:mysql://localhost/universe?user=snike;password=blahdy"
>> userTable="users" userNameCol="user_name"
>>userCredCol="user_pass"
>> userRoleTable="user_roles" roleNameCol="role_name" />
>
>You're following the example in sample.xml, which is incorrect.
>
>The MM.MySQL driver requires "&" between the passwords, not ";".
Sorry, I meant to say "between the parameters".
>Also you have to write the "&" as the & entity. So your
>connectionURL should look like this:
>
>connectionURL="jdbc:mysql://localhost/universe?user=snike&password=blahdy"
>
>>
>>
>>But when I fire up tomcat using the startup.sh script, the
>>following error comes up. This error is extra-weird because we
>>have another machine here with an identical setup and identical
>>entries in server.xml.
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Re: Problems connecting to mysql
Posted by Paul DuBois <pa...@snake.net>.
At 4:07 PM +1100 12/9/01, Tim Trainor wrote:
>Dear all,
>
>I've been tearing my hair out trying to get this thing to work for
>the last couple of days and I fear there is no alternative other
>than to bug you list gurus for some help: Here goes....
>
>I have Tomcat 4.0.1 installed and it's examples run.
>I have mysql 3.23.46 installed and it is running fine with the
>necessary grants etc.
>
>In my server.xml I have the following section which should establish
>the connection to the database:
>
> <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
> driverName="org.gjt.mm.mysql.Driver"
>
>connectionURL="jdbc:mysql://localhost/universe?user=snike;password=blahdy"
> userTable="users" userNameCol="user_name"
>userCredCol="user_pass"
> userRoleTable="user_roles" roleNameCol="role_name" />
You're following the example in sample.xml, which is incorrect.
The MM.MySQL driver requires "&" between the passwords, not ";".
Also you have to write the "&" as the & entity. So your
connectionURL should look like this:
connectionURL="jdbc:mysql://localhost/universe?user=snike&password=blahdy"
>
>
>But when I fire up tomcat using the startup.sh script, the following
>error comes up. This error is extra-weird because we have another
>machine here with an identical setup and identical entries in
>server.xml.
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>