tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Chaney <>
Subject Re: Help getting MySQL connected to Tomcat
Date Sun, 24 Feb 2008 17:11:16 GMT wrote:
> Thanks for the help. I still don't have this working completely, but 
> tomcat is now working.
> I tested mysql and it is using tcp/ip. "mysql -h -u javauser 
> -p" works fine.
> Also the MSQLAdmin program shows it is connecting to the correct port 
> 3306

>            Context init = new InitialContext();
>            Context ctx = (Context) init.lookup("java:comp/env");
>            DataSource ds = (DataSource) ctx.lookup("jdbc/CurrencyDB");
In the previous posts, you have used jdbc/TestDB in your resource 
defintion. I presume you have changed id?

  <Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"

               maxActive="100" maxIdle="30" maxWait="10000"

               username="javauser" password="javadude" driverClassName="com.mysql.jdbc.Driver"



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

View raw message