
February 23rd, 2004, 10:08 AM
|
|
Registered User
|
|
Join Date: Feb 2004
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Connect to remote DB using Tomcat
Greetings,
I've successfully setup MySQL 4.0 and Tomcat 4.1.29. However, MySQL is setup on a Linux box while Tomcat is running on a seperate Windows box. When I attempt to use the MySQL JDBC driver (J Connector) with connection pooling (as described in the Tomcat How-to tutorial) and have my URL configured to "jdbc:mysql://linuxbox:3306/DBName?autoReconnect=true".
This gives me the following error:
"Cannot create PoolableConnectionFactory"
If I install MySQL on the same box as Tomcat so that my URL is "jdbc:mysql://localhost:3306/DBName?autoReconnect=true", everything is ok.
How do I setup the URL to point to a box other than localhost?
Even if I use MySQL and Tomcat on the same box called "tomcatbox", but instead of localhost, I supply the box name (e.x.: jdbc:mysql://tomcatbox:3306/DBName?autoReconnect=true) I get the same error. The only thing that I can see is that localhost resolves to 127.0.0.1 while the box's real address is something different.
Any help would be appreciated.
Marcel Sammut
URL
|