B
Bryan
Hello All,
I'm having some trouble connecting to a MySQL database from some Java
code I have running in Tomcat. I'm positive my credentials are correct
because I can access the DB using the command-line client. The DB is
on the same machine as the Tomcat server and is listening on the
default port. Tomcat is not running under a security manager. This
code works just fine on a development machine that's configured the
same, but when I move it over to my production machine I get a
CommunicationsException. I've added some output statements in my code
to see just how much goes on before I get the exception and it looks
like it happens the very first time I try to connect. I've read where
people usually get this exception after a connection has timed out,
but I don't think that's the case here. I've considered a DB
connection pool, but I'm not sure if that would help since it's
happening the very first time I try to connect. It even does it right
after I restart MySQL and Tomcat.
Any and all suggestions will be greatly appreciated!
I'm having some trouble connecting to a MySQL database from some Java
code I have running in Tomcat. I'm positive my credentials are correct
because I can access the DB using the command-line client. The DB is
on the same machine as the Tomcat server and is listening on the
default port. Tomcat is not running under a security manager. This
code works just fine on a development machine that's configured the
same, but when I move it over to my production machine I get a
CommunicationsException. I've added some output statements in my code
to see just how much goes on before I get the exception and it looks
like it happens the very first time I try to connect. I've read where
people usually get this exception after a connection has timed out,
but I don't think that's the case here. I've considered a DB
connection pool, but I'm not sure if that would help since it's
happening the very first time I try to connect. It even does it right
after I restart MySQL and Tomcat.
Any and all suggestions will be greatly appreciated!