EMH_Rick_1
09-22-2004, 11:36 AM
Hey, y'all.... I need some help here, and hopefully a good soul (or a bad soul in a good mood) will help me out! :?
I am trying to access Mysql using JDBC. All I get is a "Connection refused" message. I have Linux installed in one of my home PCs, and my small application works just fine. I even installed the exact same version of Mysql, Java and Tomcat that WestHost offers, just to keep things as compatible as possible. Setting up Tomcat was fine, but I can't get the darned JDBC connection to work.
To better isolate and research this problem, I created a very small Java program, whose only purpose in life is to connect to the database and display the contents of a test table, and I am changing all possible settings in Mysql, trying to make it work, and so far nothing, nada, zilch... same error over and over again - so it's nothing on Tomcat. I tested the same thing in my home Linux box, and it works fine.
The fact that the program works on my local machine indicates that some configuration is out of whack in my WestHost VPS, and I can tell you right off the bat what the problem is NOT:
- It's not bypassing the "skip-networking" in the my.cnf file. I already tried that.
- User and password are checked and correct ( I am assuming that Mysql and Tomcat are in localhost, which I think it's safe to say is a fact )
- It's not any other connection information - the driver name is correct, the classpath is initialized properly.
- Oh and by the way, I DID upload the JDBC driver and its location is in the classpath
- TCP/IP access is NOT enabled in my Mysql, but since the connection is coming from localhost, that shouldn't be necessary. Besides, PHP can access Mysql fine, which shows that Mysql is responding to a connection originated locally.
So, this is not really a generic JDBC/Mysql question, it's a question regarding JDBC/Mysql in WestHost.
I contacted their user support, and even though they were quick to respond and corteous, JDBC connections "are not supported at this time", as the manual so eloquently puts it. :cry:
HELP!
Thanks :)
Rick
I am trying to access Mysql using JDBC. All I get is a "Connection refused" message. I have Linux installed in one of my home PCs, and my small application works just fine. I even installed the exact same version of Mysql, Java and Tomcat that WestHost offers, just to keep things as compatible as possible. Setting up Tomcat was fine, but I can't get the darned JDBC connection to work.
To better isolate and research this problem, I created a very small Java program, whose only purpose in life is to connect to the database and display the contents of a test table, and I am changing all possible settings in Mysql, trying to make it work, and so far nothing, nada, zilch... same error over and over again - so it's nothing on Tomcat. I tested the same thing in my home Linux box, and it works fine.
The fact that the program works on my local machine indicates that some configuration is out of whack in my WestHost VPS, and I can tell you right off the bat what the problem is NOT:
- It's not bypassing the "skip-networking" in the my.cnf file. I already tried that.
- User and password are checked and correct ( I am assuming that Mysql and Tomcat are in localhost, which I think it's safe to say is a fact )
- It's not any other connection information - the driver name is correct, the classpath is initialized properly.
- Oh and by the way, I DID upload the JDBC driver and its location is in the classpath
- TCP/IP access is NOT enabled in my Mysql, but since the connection is coming from localhost, that shouldn't be necessary. Besides, PHP can access Mysql fine, which shows that Mysql is responding to a connection originated locally.
So, this is not really a generic JDBC/Mysql question, it's a question regarding JDBC/Mysql in WestHost.
I contacted their user support, and even though they were quick to respond and corteous, JDBC connections "are not supported at this time", as the manual so eloquently puts it. :cry:
HELP!
Thanks :)
Rick