Tomcat MySQL -
 

Since the early days of Java, Java has included a database abstraction layer named JDBC (Java Database Connectivity), and this allows Java programs to [somewhat] forget about which database implementation it's connecting to.  So, because of JDBC, Tomcat doesn't need to care which database it is hooked up to.  What's more, it is webapps that use the database, really, not Tomcat.  And, webapps are separate codebases from Tomcat, so once more Tomcat wouldn't need to be concerned with which database is being used.

The only steps a Tomcat administrator may need to take to configure MySQL databases to work with Tomcat are:
- Get your choice of database's JDBC driver JAR file (the database vendor always offers one) and install that in CATALINA_HOME/lib/
- If your webapp uses a container-managed JDBC connection pool, configure that in conf/server.xml, and configure the database.. See the official Tomcat docs at these two pages:
   http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html#JDBC%2...
   http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html
- Restart Tomcat
- Read Tomcat's log files -- they may show failures and give details that would help you investigate and fix any problems
- Test the connection by deploying and using a web application that uses the JDBC connection pool
- Read the database log files to see if there are any errors, or other informative log messages -- you may see failure messages there as well

 
Unfortunately, not many Tomcat MySQL resources exist, but this should get you started.
Comments on this post:
 #

need a mysql connector.. trying to develop war files. any assistance would be appreciated.

 

Post new comment

The content of this field is kept private and will not be shown publicly.

Download Tcat Server - Tomcat Simplified

Develop, diagnose, manage, configure, and deploy your Apache Tomcat applications with ease, and break free from bloated legacy JEE app servers. Built on 100% Tomcat, with no changes to the core code, Tcat Server is free for developers, and there is no commitment required. Try it now, risk-free! 
 

click thumbnail to enlarge

Link to this page

Sign up for our Newsletter!