It seems yu got in troubles with connection to mysql database. I just made it yesterday night to have my Tomcat's manager properly set up...
First make yur database and tables. I can give yu a .sql script.
Second, under sql admin, create a user who'll handle this database:
user: tomcat, password: tompass.
They are many ways to do it, but on i use to is - assuming the db is called tomcatusers -
GRANT ALL PRIVILEGES ON tomcatusers.* TO tomcat@localhost IDENTIFIED BY 'tompass';
If all is OK, yu can then test it with:
shell# mysql -u tomcat -p
password:
bla bla ../..
mysql> connect tomcatusers;
bla bla ../..
mysql>mysql> show tables;
+-----------------------+
| Tables_in_tomcatusers |
+-----------------------+
| roles |
| user_roles |
| users |
+-----------------------+
3 rows in set (0.00 sec)
mysql>
After that, yu have to modify the server.xml according to the Tomcat's doc.
For instance:
<!-- Because this Realm is here, an instance will be shared globally -->
<!-- <Realm className="org.apache.catalina.realm.MemoryRealm" /> -->
<!-- Test with a JDBCRealm connected to a MySQL DataBase -->
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost/tomcatusers"
connectionName="tomcat" connectionPassword="tompass"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
Hope this help.
JLB :O)
Sam Taylor wrote:
you might also want to check that you haven't exceeded your max connections to mysql...-----Original Message----- From: Larry Meadors [mailto:Larry.Meadors@;plumcreek.com] Sent: Wednesday, October 30, 2002 8:31 AM To: [EMAIL PROTECTED] Subject: RE: Connecting to mysql - Server configuration denies accessto data source I got this a long time ago, so if I am wrong, sorry. Look in the user table in mysql, and you will find that each user is associated with a host. The user you have in your datasource gets a hostname added to it (i.e., lmeadors@mylinuxbox instead of just lmeadors) and that combination is not valid in your mysql user table. Thanks for the reminder, I have a mysql database to setup today. ;-) Larry PS: BTW, John is right - please be more specific in your posts, you will get much better responses.[EMAIL PROTECTED] 10/30/02 06:06 AM >>>Has anybody seen what? Please be more specific. John-----Original Message----- From: Kevin Passey [mailto:kpassey@;kdpsoftware.co.uk] Sent: Wednesday, October 30, 2002 6:50 AM To: Tomcat Users List (E-mail) Subject: Connecting to mysql - Server configuration denies access to data source Has anybody seen this. I've set the mysql tables correctly. Can anybody shed any light on this. Thanks Kevin Passey KDP Software Limited Tel: 01273 712830 Fax: 08700 510103 mailto:kpassey@;kdpsoftware.co.uk http://www.kdpsoftware.co.uk -- To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org> For ad ditional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>-- To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org> -- To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org> -- To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org> For additio nal commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>
-- To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>