tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul DuBois <p...@snake.net>
Subject Re: MySQL jdbc connection url [ + server.xml bug]
Date Thu, 01 Nov 2001 16:16:57 GMT
At 1:51 PM +0100 11/1/01, Andrius wrote:
>Hello,
>     What's the correct MySQL jdbc connection url? I'm trying to setup
>jdbcRealm on tomcat 4.0.1,
>     and using this url pattern :
>connectionURL="jdbc:mysql://localhost/authority?user=test;password=test"
>    but it goes wrong - it says "Invalid authorization exception: Access
>denied for user: 'test;password@host'.
>     I've configured server side permissions properly (mySQL accepts using
>another client). thanx for any response.
>
>obj.

Only very old versions of the MM.MySQL driver accept ; as a parameter
separator character.  Current versions accept only & as the separator.

If any of the Tomcap developers happen to read this:

Note that the server.xml file that ships with Tomcat 4.0.1 (and probably
earlier versions as well) is mistaken on this point.  The relevant 
section looks
like this:

       <!--
       <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
              driverName="org.gjt.mm.mysql.Driver"
 
connectionURL="jdbc:mysql://localhost/authority?user=test;password=test"
               userTable="users" userNameCol="user_name" userCredCol="user_pass"
           userRoleTable="user_roles" roleNameCol="role_name" />
       -->

The connectionURL line should be fixed to say this instead:

connectionURL="jdbc:mysql://localhost/authority?user=test&password=test"

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message