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