It still doesn´t work.
this is what Catalina.out sais:

INFO: Starting Coyote HTTP/1.1 on http-8080
27.04.2007 01:14:44 org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
27.04.2007 01:14:44 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/228  
config=/jakarta-tomcat-5.0.28/conf/jk2.properties
27.04.2007 01:14:44 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-443
27.04.2007 01:14:44 org.apache.catalina.startup.Catalina start

And the part of server.xml:

<Service name="Catalina">
    <Connector acceptCount="100" connectionTimeout="20000"
    disableUploadTimeout="true" port="8080" redirectPort="443" 
maxSpareThreads="75" maxThreads="150" minSpareThreads="25">
    </Connector>
    <Connector port="8009" protocol="AJP/1.3" 
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"
    redirectPort="443">
    </Connector>
    <Connector className="org.apache.coyote.tomcat5.CoyoteConnector" 
keystoreFile="/root/.keystore" keystorePass="myKey"
    port="443" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" 
enableLookups="false" disableUploadTimeout="true"
    acceptCount="100" debug="0" scheme="https" secure="true" clientAuth="false" 
sslProtocol="TLS" />
    <Engine defaultHost="localhost" name="Catalina">
      <DefaultContext 
className="org.apache.catalina.core.StandardDefaultContext" reloadable="true">
      </DefaultContext>
      <Host appBase="webapps" name="localhost">
        <Logger className="org.apache.catalina.logger.FileLogger" 
prefix="localhost_log." suffix=".txt" timestamp="true"/>
      </Host>
      <Logger className="org.apache.catalina.logger.FileLogger" 
prefix="catalina_log." suffix=".txt" timestamp="true"/>
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm" 
resourceName="UserDatabase" />
      <realm className="org.apache.catalina.realm.JDBCRealm" debug="99" 
driverName="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://localhost:3306/auth" connectionName="con_name" 
connectionPassword="con_pass"
userTable="users" userNameCol="user_name" userCredCol="user_pass" 
userRoleTable="user_roles" roleNameCol="role_name" />
    </Engine>
  </Service>

I checked Driver name and path, DB-port, DB-name, DB-Table-. and -column-names, 
I think tthe settings are OK.
Why "ajp13 listening on /0.0.0.0:8009" ? Is this normal?
Why are there no entries in catalina.out, localhost_log?  Catalina_log has a 
size of 0 bytes.
DB-access has root-permissions.

Where do I make the mistake ?


----- Original Message ----- 
From: "David Short" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <users@tomcat.apache.org>
Sent: Wednesday, April 25, 2007 1:35 AM
Subject: RE: Tomcat UserDB in MySQL


Add a realm under the <Engine name="Catalina" defaultHost="localhost">
section.

You'll need to copy the correct MySQL JDBC driver
(http://dev.mysql.com/downloads/connector/j/5.0.html) to the
tomcat_home\common\lib directory.  Replace the "test" in localhost:3306/test
with you database name.

I've got it running on Tomcat 5.5.23 and MySQL 5.1.


      <Realm  className="org.apache.catalina.realm.JDBCRealm"
             driverName="com.mysql.jdbc.Driver"
          connectionURL="jdbc:mysql://localhost:3306/test" debug="99"
         connectionName="root" connectionPassword="password"
              userTable="users" userNameCol="username" userCredCol="pass"
          userRoleTable="roles" roleNameCol="role" />

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 24, 2007 4:26 PM
To: Tomcat Users List
Subject: Tomcat UserDB in MySQL

I want to replace the "tomcat-users.xml" with two tables in MySQL:

Database : auth
table users :    username varchar(15) primary key NN
                    pass varchar(41) NN

table roles :     username varchar(15) primary key NN
                    role varchar(10) NN

Tried the solution from thread "[SOLVED] :) user authetication on MySql db
issue need some help!"
from the list, but still doesn´t work.

Are there any more changes I have to make.
Do I need to update TC (now using TC 5.0.28) I want to avoid an update,
because everything else is running fine, and I made the experience that
updates often change this.

The TC admintool doesn´t  give the possibility to add MySQL userDBs.

Thanks




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to