tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Short" <>
Subject RE: Tomcat UserDB in MySQL
Date Tue, 24 Apr 2007 23:35:35 GMT
Add a realm under the <Engine name="Catalina" defaultHost="localhost">

You'll need to copy the correct MySQL JDBC driver
( 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"
          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: [] 
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.


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message