Hi Tomcatusers,
this is my first time here, so I say hello to you
My english is not the best, but perhaps it's good enough to tell you my problems ;-)
I've installed tomcat4.1.12, build my first JSPs, installed the mysql-driver org.gjt.mm.mysql.Driver, connected to my Database, create some tables, insert rows ... all works fine )
Now, I want to use the tomcat-user-authorization with mysql.
So, I create a DB tomcatusers and add the mysqluser tomcatadmin, set the passwd. I create the mysqlroles for this user and this DB: Allow ALL from ANY host for my user tomcatadmin - a little bit to much - I know ;-)
Than I create the tables user, roles and user_roles and insert a dummy-user and a dummy-role.
I configured the server.xml with :
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost/tomcatusers?user=tomcatadmin;password=mypass"
userTable="users" userNameCol="user_name"
userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
Sooo ... now I restart the tomcat, but it dosn't work. Looking in the log catalina.out, there I read the following:
Exception opening database connection: java.sql.SQLException: General error: Access denied for user: '@localhost' to database 'tomcatusers'
[...]
Yeah! I didn't know, that @localhost is an user!! I thought it was a host ... ?! OK ... a bit confused.
Later I changed in the connectionURL the localhost to the ip:
from
"jdbc:mysql://localhost/tomcatusers?user=tomcatadmin;password=mypass"
to
"jdbc:mysql://192.168.1.1/tomcatusers?user=tomcatadmin;password=mypass"
Starting again an look in the logs. In catalina.out I read:
java.sql.SQLException: Invalid authorization specification:
Access denied for user: 'tomcatadmin;password@tomserv.mylan.de' (Using password: NO)
Ääähh? Is there an error in the stringmanipulation?? The username should really be tomcatadmin;password??? Or is the connectionURL incorrect?? Now: very confused :-(
Before I jump thru my window - is there anybody who can help me?
Tol
this is my first time here, so I say hello to you
My english is not the best, but perhaps it's good enough to tell you my problems ;-)
I've installed tomcat4.1.12, build my first JSPs, installed the mysql-driver org.gjt.mm.mysql.Driver, connected to my Database, create some tables, insert rows ... all works fine )
Now, I want to use the tomcat-user-authorization with mysql.
So, I create a DB tomcatusers and add the mysqluser tomcatadmin, set the passwd. I create the mysqlroles for this user and this DB: Allow ALL from ANY host for my user tomcatadmin - a little bit to much - I know ;-)
Than I create the tables user, roles and user_roles and insert a dummy-user and a dummy-role.
I configured the server.xml with :
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost/tomcatusers?user=tomcatadmin;password=mypass"
userTable="users" userNameCol="user_name"
userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
Sooo ... now I restart the tomcat, but it dosn't work. Looking in the log catalina.out, there I read the following:
Exception opening database connection: java.sql.SQLException: General error: Access denied for user: '@localhost' to database 'tomcatusers'
[...]
Yeah! I didn't know, that @localhost is an user!! I thought it was a host ... ?! OK ... a bit confused.
Later I changed in the connectionURL the localhost to the ip:
from
"jdbc:mysql://localhost/tomcatusers?user=tomcatadmin;password=mypass"
to
"jdbc:mysql://192.168.1.1/tomcatusers?user=tomcatadmin;password=mypass"
Starting again an look in the logs. In catalina.out I read:
java.sql.SQLException: Invalid authorization specification:
Access denied for user: 'tomcatadmin;password@tomserv.mylan.de' (Using password: NO)
Ääähh? Is there an error in the stringmanipulation?? The username should really be tomcatadmin;password??? Or is the connectionURL incorrect?? Now: very confused :-(
Before I jump thru my window - is there anybody who can help me?
Tol