tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Chaney <a...@compulsivecreative.com>
Subject Re: Help getting MySQL connected to Tomcat
Date Sun, 24 Feb 2008 17:11:16 GMT
kevin@witten-enterprises.com 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 127.0.0.1 -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"

               url="jdbc:mysql://localhost:3306/javatest"/>

</Context>



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message